/* ===== CSS Custom Properties ===== */
:root {
  --sidebar-bg: #1a1a2e;
  --sidebar-width: 270px;
  --content-bg: #0d0d1a;
  --accent: #7c3aed;
  --accent-light: #a855f7;
  --accent-glow: rgba(124, 58, 237, 0.15);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --border: #2d2d4e;
  --code-bg: #1e1e2e;
  --code-border: #313155;
  --tip-bg: rgba(34, 197, 94, 0.08);
  --tip-border: #22c55e;
  --warning-bg: rgba(251, 191, 36, 0.08);
  --warning-border: #fbbf24;
  --info-bg: rgba(99, 102, 241, 0.08);
  --info-border: #6366f1;
  --danger-bg: rgba(239, 68, 68, 0.08);
  --danger-border: #ef4444;
  --nav-active-bg: rgba(124, 58, 237, 0.2);
  --scrollbar-thumb: #3d3d6b;
  --tag-bg: rgba(124, 58, 237, 0.2);
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--content-bg);
  color: var(--text);
  line-height: 1.7;
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ===== Sidebar ===== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.logo-sub {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}

.nav-group {
  margin-bottom: 4px;
}

.nav-group-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  padding: 8px 20px 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  border-radius: 0;
  transition: all 0.15s ease;
  border-left: 2px solid transparent;
  cursor: pointer;
}

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

.nav-link.active {
  color: var(--accent-light);
  background: var(--nav-active-bg);
  border-left-color: var(--accent);
}

.nav-icon { font-size: 15px; flex-shrink: 0; opacity: 0.85; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-dim);
  flex-shrink: 0;
}

.sidebar-footer a { color: var(--accent-light); text-decoration: none; }
.sidebar-footer a:hover { text-decoration: underline; }

/* ===== Hamburger (mobile) ===== */
.hamburger {
  display: none;
  position: fixed;
  top: 14px; left: 14px;
  z-index: 200;
  background: var(--sidebar-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 40px; height: 40px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: all 0.3s;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99;
}

/* ===== Main Content ===== */
.main {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
}

.content-wrapper {
  max-width: 820px;
  padding: 48px 48px 100px;
  margin: 0 auto;
}

/* ===== Section Styles ===== */
.section {
  margin-bottom: 80px;
  scroll-margin-top: 24px;
}

/* ===== Typography ===== */
h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.25;
  color: #fff;
  margin-bottom: 12px;
}

h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #fff;
  margin-bottom: 10px;
  margin-top: 40px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  margin-top: 28px;
}

p {
  color: var(--text-muted);
  margin-bottom: 14px;
  font-size: 15px;
}

strong { color: var(--text); font-weight: 600; }

a { color: var(--accent-light); text-decoration: none; }
a:hover { text-decoration: underline; }

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

li {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 6px;
  line-height: 1.6;
}

li strong { color: var(--text); }

/* ===== Section Header ===== */
.section-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
}

.section-icon {
  font-size: 28px;
  flex-shrink: 0;
  margin-top: 4px;
}

.section-title h1 { margin-bottom: 4px; }
.section-title p { margin-bottom: 0; font-size: 15px; }

/* ===== Tags ===== */
.tag {
  display: inline-block;
  padding: 2px 10px;
  background: var(--tag-bg);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 20px;
  font-size: 12px;
  color: var(--accent-light);
  font-weight: 500;
  margin-right: 4px;
  margin-bottom: 4px;
}

/* ===== Divider ===== */
.divider {
  height: 1px;
  background: var(--border);
  margin: 32px 0;
}

/* ===== Code Blocks ===== */
.code-block {
  position: relative;
  margin: 16px 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--code-border);
  background: var(--code-bg);
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--code-border);
}

.code-lang {
  font-size: 11px;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.copy-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 3px 10px;
  border-radius: 5px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 4px;
}

.copy-btn:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: var(--accent-glow);
}

.copy-btn.copied {
  border-color: var(--tip-border);
  color: var(--tip-border);
}

pre {
  padding: 16px;
  overflow-x: auto;
  margin: 0;
}

code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 13.5px;
  line-height: 1.7;
  color: #cdd6f4;
}

/* Inline code */
p code, li code, h3 code {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 13px;
  color: #a6e3a1;
}

/* Syntax colors */
.kw { color: #cba6f7; }   /* keywords */
.str { color: #a6e3a1; }  /* strings */
.cm { color: #6c7086; font-style: italic; } /* comments */
.num { color: #fab387; }  /* numbers */
.fn { color: #89b4fa; }   /* functions */
.var { color: #cdd6f4; }  /* variables */
.prop { color: #89dceb; } /* properties */
.punc { color: #89dceb; } /* punctuation */

/* ===== Callout Boxes ===== */
.callout {
  border-radius: 8px;
  padding: 14px 16px;
  margin: 16px 0;
  display: flex;
  gap: 10px;
  border: 1px solid;
  font-size: 14.5px;
}

.callout-icon { flex-shrink: 0; font-size: 16px; margin-top: 1px; }
.callout-body { flex: 1; }
.callout-body p { margin-bottom: 0; font-size: 14px; }
.callout-body strong { display: block; margin-bottom: 4px; font-size: 14px; }

.callout.tip {
  background: var(--tip-bg);
  border-color: rgba(34, 197, 94, 0.3);
  color: #86efac;
}
.callout.tip p { color: #86efac; }

.callout.warning {
  background: var(--warning-bg);
  border-color: rgba(251, 191, 36, 0.3);
  color: #fde68a;
}
.callout.warning p { color: #fde68a; }

.callout.info {
  background: var(--info-bg);
  border-color: rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
}
.callout.info p { color: #a5b4fc; }

.callout.danger {
  background: var(--danger-bg);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}
.callout.danger p { color: #fca5a5; }

/* ===== Steps ===== */
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.steps li {
  counter-increment: step;
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
  align-items: flex-start;
}

.steps li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  margin-top: 1px;
}

/* ===== Grid Cards ===== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 16px 0;
}

.card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  transition: border-color 0.2s;
}

.card:hover { border-color: rgba(124, 58, 237, 0.4); }
.card-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.card p { font-size: 13px; margin-bottom: 0; }

/* ===== Command Table ===== */
.cmd-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}

.cmd-table th {
  text-align: left;
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cmd-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(45,45,78,0.6);
  color: var(--text-muted);
  vertical-align: top;
}

.cmd-table tr:last-child td { border-bottom: none; }
.cmd-table tr:hover td { background: rgba(255,255,255,0.02); }
.cmd-table td code {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 12.5px;
  color: #89b4fa;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}

/* ===== Hero (Úvod) ===== */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-glow);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--accent-light);
  margin-bottom: 16px;
}

.hero-title {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.2;
  color: #fff;
  margin-bottom: 16px;
}

.hero-title span {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 580px;
  margin-bottom: 28px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 32px;
}

.feature-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.feature-card:hover {
  border-color: rgba(124, 58, 237, 0.5);
  background: var(--accent-glow);
  transform: translateY(-2px);
  text-decoration: none;
}

.feature-card-icon { font-size: 22px; margin-bottom: 8px; }
.feature-card-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.feature-card-desc { font-size: 12px; color: var(--text-dim); margin: 0; line-height: 1.5; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .content-wrapper { padding: 32px 28px 80px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}

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

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 8px 0 32px rgba(0,0,0,0.5);
  }

  .sidebar-overlay.visible {
    display: block;
  }

  .hamburger {
    display: flex;
  }

  .main {
    margin-left: 0;
  }

  .content-wrapper {
    padding: 64px 20px 80px;
  }

  .hero-title { font-size: 28px; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .cmd-table { font-size: 13px; }
}

@media (max-width: 480px) {
  .feature-grid { grid-template-columns: 1fr; }
}
