/* ==========================================================================
   Boumb'App — User Manual Stylesheet
   Clean, technical, dark-mode design system. Zero external dependencies.
   ========================================================================== */

:root {
  --bg-app: #09090c;
  --bg-sidebar: #0e0e13;
  --bg-surface: #14141c;
  --bg-surface-elevated: #1a1a24;
  --border-color: #232330;
  --border-hover: #37374a;

  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-subtle: #6b7280;

  --accent-primary: #bb86fc;
  --accent-secondary: #646cff;
  --accent-cyan: #00f0ff;
  --accent-warning: #f59e0b;
  --accent-danger: #ef4444;
  --accent-success: #10b981;

  --font-sans:
    system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell,
    sans-serif;
  --font-mono:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
    monospace;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

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

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

body {
  background-color: var(--bg-app);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  display: flex;
  min-height: 100vh;
}

/* Layout */
.manual-layout {
  display: flex;
  width: 100%;
}

/* Sidebar */
.sidebar {
  width: 280px;
  flex-shrink: 0;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sidebar-header {
  margin-bottom: 2rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.5px;
}

.brand-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent-primary);
  background: rgba(187, 134, 252, 0.12);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  margin-left: 0.5rem;
}

.nav-group-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  color: var(--text-subtle);
  margin: 1.5rem 0 0.5rem 0.5rem;
}

.sidebar-nav {
  list-style: none;
}

.nav-item {
  margin-bottom: 0.25rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.65rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.nav-link:hover {
  color: var(--text-main);
  background-color: var(--bg-surface);
}

.nav-link.active {
  color: #ffffff;
  background-color: var(--bg-surface-elevated);
  font-weight: 600;
  border-left: 3px solid var(--accent-primary);
}

.sidebar-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.lang-switch-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-subtle);
}

.lang-switch-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.lang-switch-link.active {
  color: var(--accent-primary);
  background: rgba(187, 134, 252, 0.12);
}

.studio-return-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.studio-return-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-hover);
}

/* Main Content Area */
.content-wrapper {
  flex: 1;
  overflow-y: auto;
  padding: 3rem 4rem 5rem;
}

.article-container {
  max-width: 840px;
  margin: 0 auto;
}

/* Typography & Content */
h1 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.75px;
  color: #ffffff;
  margin-bottom: 1.5rem;
  line-height: 1.25;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text-main);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-color);
}

h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main);
  margin-top: 1.75rem;
  margin-bottom: 0.6rem;
}

p {
  margin-bottom: 1.2rem;
  color: var(--text-muted);
}

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

ul,
ol {
  margin-bottom: 1.25rem;
  padding-left: 1.4rem;
  color: var(--text-muted);
}

li {
  margin-bottom: 0.45rem;
}

/* Keyboard Keys */
kbd {
  display: inline-block;
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-bottom: 2px solid #111116;
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  vertical-align: middle;
}

/* Code */
code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background-color: var(--bg-surface);
  color: #e5c07b;
  padding: 2px 5px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

pre {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

pre code {
  background: transparent;
  padding: 0;
  color: #abb2bf;
  border: none;
  font-size: 0.88rem;
  line-height: 1.6;
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: left;
}

th {
  background-color: var(--bg-surface-elevated);
  color: var(--text-main);
  font-weight: 600;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
}

td {
  padding: 0.65rem 1rem;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

tr:nth-child(even) td {
  background-color: rgba(255, 255, 255, 0.015);
}

/* Callout alerts */
.callout {
  border-left: 4px solid var(--border-color);
  background-color: var(--bg-surface);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.callout-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout-note {
  border-left-color: var(--accent-secondary);
}
.callout-note .callout-title {
  color: #93c5fd;
}

.callout-important {
  border-left-color: var(--accent-cyan);
}
.callout-important .callout-title {
  color: var(--accent-cyan);
}

.callout-warning {
  border-left-color: var(--accent-warning);
}
.callout-warning .callout-title {
  color: var(--accent-warning);
}

/* Links */
a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* Pagination / Next-Prev buttons */
.article-pagination {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-color);
}

.page-btn {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1.25rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
  max-width: 48%;
}

.page-btn:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  text-decoration: none;
}

.page-btn-prev {
  align-items: flex-start;
}

.page-btn-next {
  align-items: flex-end;
  margin-left: auto;
}

.page-btn-sub {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-subtle);
  font-weight: 600;
}

.page-btn-title {
  font-size: 0.95rem;
  color: var(--text-main);
  font-weight: 600;
}

/* Responsive */
@media (max-width: 900px) {
  .manual-layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
  }
  .content-wrapper {
    padding: 1.5rem 1rem 3rem;
  }
  .article-pagination {
    flex-direction: column;
  }
  .page-btn {
    max-width: 100%;
  }
}
