@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap');

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a2e;
  --bg-card-hover: #1e1e35;
  --text-primary: #e8e8f0;
  --text-secondary: #a0a0b8;
  --text-muted: #6a6a80;
  --accent: #6c5ce7;
  --accent-light: #a29bfe;
  --accent-glow: rgba(108, 92, 231, 0.3);
  --warning: #fdcb6e;
  --warning-bg: rgba(253, 203, 110, 0.08);
  --danger: #ff6b6b;
  --success: #00b894;
  --success-bg: rgba(0, 184, 148, 0.08);
  --border: rgba(255, 255, 255, 0.06);
  --border-accent: rgba(108, 92, 231, 0.3);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0,0,0,0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.8;
  font-size: 16px;
  min-height: 100vh;
}

/* Background decoration */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 20%, rgba(108,92,231,0.06) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(162,155,254,0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* Sidebar Navigation */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 32px 0;
  overflow-y: auto;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 0 24px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.sidebar-header h2 {
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.sidebar-header p {
  font-size: 12px;
  color: var(--text-muted);
}

.nav-section {
  padding: 8px 16px;
}

.nav-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  padding: 8px;
  font-weight: 600;
}

.nav-link {
  display: block;
  padding: 10px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  margin-bottom: 2px;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(108, 92, 231, 0.1);
}

.nav-link.active {
  color: var(--accent-light);
  background: rgba(108, 92, 231, 0.15);
  font-weight: 500;
}

.nav-link .step-num {
  display: inline-block;
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  border-radius: 6px;
  background: rgba(108, 92, 231, 0.2);
  color: var(--accent-light);
  font-size: 11px;
  font-weight: 600;
  margin-right: 8px;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 200;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 20px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

/* Main Content */
.main {
  margin-left: 280px;
  max-width: 900px;
  padding: 48px 48px 120px;
}

/* Hero */
.hero {
  text-align: center;
  padding: 60px 0 48px;
  position: relative;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  background: rgba(108, 92, 231, 0.15);
  border: 1px solid var(--border-accent);
  color: var(--accent-light);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 0%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Tab Navigation */
.tab-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 40px;
  padding: 6px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.tab-btn {
  flex: 1;
  padding: 14px 24px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.tab-btn:hover { color: var(--text-primary); }

.tab-btn.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.tab-content { display: none; animation: fadeIn 0.4s ease; }
.tab-content.active { display: block; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Section Cards */
.section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  margin-bottom: 28px;
  transition: border-color 0.3s ease;
}

.section:hover { border-color: var(--border-accent); }

.section h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-accent);
  background: linear-gradient(135deg, #fff, var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section h3, .section h4 {
  font-size: 20px;
  font-weight: 600;
  color: var(--accent-light);
  margin: 28px 0 14px;
}

.section h4 { font-size: 17px; }

.section p, .section li {
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.section strong { color: var(--text-primary); font-weight: 600; }

.section a {
  color: var(--accent-light);
  text-decoration: none;
  border-bottom: 1px dashed var(--accent-light);
  transition: opacity 0.2s;
}

.section a:hover { opacity: 0.8; }

.section ul, .section ol {
  padding-left: 24px;
  margin: 12px 0;
}

/* Images */
.img-wrapper {
  margin: 16px 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
}

.img-wrapper img {
  width: 100%;
  display: block;
  transition: transform 0.3s ease;
  cursor: zoom-in;
}

.img-wrapper img:hover { transform: scale(1.02); }

/* Code blocks */
.code-block {
  background: #0d0d14;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 14px 0;
  font-family: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
  color: #a8d8a8;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Warning / Info boxes */
.callout {
  padding: 18px 22px;
  border-radius: var(--radius-sm);
  margin: 18px 0;
  font-size: 15px;
}

.callout-warning {
  background: var(--warning-bg);
  border-left: 3px solid var(--warning);
  color: var(--warning);
}

.callout-success {
  background: var(--success-bg);
  border-left: 3px solid var(--success);
  color: var(--success);
}

.callout-info {
  background: rgba(108, 92, 231, 0.08);
  border-left: 3px solid var(--accent);
  color: var(--accent-light);
}

/* Table */
.table-wrapper {
  overflow-x: auto;
  margin: 18px 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th {
  background: rgba(108, 92, 231, 0.15);
  color: var(--accent-light);
  font-weight: 600;
  padding: 14px 16px;
  text-align: left;
  white-space: nowrap;
}

td {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
}

tr:hover td { background: rgba(255,255,255,0.02); }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  backdrop-filter: blur(8px);
}

.lightbox.show { display: flex; }

.lightbox img {
  max-width: 92%;
  max-height: 92vh;
  border-radius: 8px;
  box-shadow: 0 0 60px rgba(0,0,0,0.5);
}

/* Progress indicator */
.progress-bar {
  position: fixed;
  top: 0;
  left: 280px;
  right: 0;
  height: 3px;
  background: var(--bg-secondary);
  z-index: 50;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  width: 0%;
  transition: width 0.1s linear;
}

/* Responsive */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .nav-toggle { display: flex; }
  .main { margin-left: 0; padding: 24px 18px 80px; }
  .hero h1 { font-size: 28px; }
  .section { padding: 24px 20px; }
  .progress-bar { left: 0; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(108,92,231,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(108,92,231,0.5); }
