/* ============================================
   Ducky Docs - Design System
   Style: Soft Pastel Documentation
   Font: Nunito (heading) + DM Sans (body) + JetBrains Mono (code)
   ============================================ */

:root {
  /* -- Mau chinh -- */
  --docs-bg: transparent;
  --docs-surface: rgba(255, 255, 255, 0.88);
  --docs-sidebar-bg: rgba(255, 255, 255, 0.9);
  --docs-border: rgba(255, 255, 255, 0.55);
  --docs-border-hover: rgba(255, 255, 255, 0.75);

  /* -- Glass -- */
  --glass-blur: 20px;
  --glass-bg: rgba(255, 255, 255, 0.82);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);

  /* -- Accent -- */
  --accent-primary: #e8637a;
  --accent-primary-light: rgba(252, 232, 236, 0.85);
  --accent-primary-hover: #d44d65;
  --accent-secondary: #6bb5a0;
  --accent-secondary-light: rgba(230, 245, 240, 0.85);
  --accent-blue: #5b8fd9;
  --accent-blue-light: rgba(234, 241, 251, 0.85);
  --accent-amber: #d4a03c;
  --accent-amber-light: rgba(253, 244, 228, 0.85);
  --accent-danger: #c44e4e;
  --accent-danger-light: rgba(252, 232, 232, 0.85);

  /* -- Text -- */
  --text-primary: #1a1512;
  --text-secondary: #4a4540;
  --text-tertiary: #8a8480;
  --text-inverse: #ffffff;

  /* -- Font -- */
  --font-heading: 'Nunito', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* -- Spacing -- */
  --sidebar-width: 320px;
  --topbar-height: 70px;
  --content-max-width: 460px;

  /* -- Shadow -- */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.1);

  /* -- Transition -- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* -- Z-index -- */
  --z-sidebar: 40;
  --z-overlay: 30;
  --z-topbar: 20;
}

/* ============================================
   Dark Mode
   ============================================ */
[data-theme="dark"] {
  --docs-bg: transparent;
  --docs-surface: rgba(30, 28, 26, 0.88);
  --docs-sidebar-bg: rgba(28, 26, 24, 0.92);
  --docs-border: rgba(255, 255, 255, 0.08);
  --docs-border-hover: rgba(255, 255, 255, 0.15);

  --glass-bg: rgba(30, 28, 26, 0.82);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);

  --accent-primary: #f0879a;
  --accent-primary-light: rgba(240, 135, 154, 0.15);
  --accent-primary-hover: #e8637a;
  --accent-secondary: #7fd4ba;
  --accent-secondary-light: rgba(127, 212, 186, 0.12);
  --accent-blue: #7daaeb;
  --accent-blue-light: rgba(125, 170, 235, 0.12);
  --accent-amber: #e8b84d;
  --accent-amber-light: rgba(232, 184, 77, 0.12);
  --accent-danger: #e06060;
  --accent-danger-light: rgba(224, 96, 96, 0.12);

  --text-primary: #f0ece8;
  --text-secondary: #b5b0aa;
  --text-tertiary: #7a756f;
  --text-inverse: #1a1512;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] body {
  background: #121010;
}

[data-theme="dark"] .bg-overlay {
  background: rgba(18, 16, 14, 0.72);
}

[data-theme="dark"] .docs-topbar {
  background: rgba(28, 26, 24, 0.75);
}

[data-theme="dark"] .command-syntax {
  background: rgba(40, 36, 32, 0.7);
}

[data-theme="dark"] .command-steps {
  background: rgba(40, 36, 32, 0.6);
}

[data-theme="dark"] .docs-hero-banner {
  background: linear-gradient(135deg, rgba(240, 135, 154, 0.1) 0%, rgba(127, 212, 186, 0.08) 100%);
}

[data-theme="dark"] .docs-callout-info {
  background: rgba(125, 170, 235, 0.12);
  color: #9dc2f0;
}

[data-theme="dark"] .docs-callout-warning {
  background: rgba(232, 184, 77, 0.12);
  color: #e0c06a;
}

[data-theme="dark"] .docs-callout-danger {
  background: rgba(224, 96, 96, 0.12);
  color: #e89090;
}

[data-theme="dark"] .docs-callout code {
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .command-syntax code {
  border-color: rgba(240, 135, 154, 0.2);
}

[data-theme="dark"] .sidebar-search {
  background: rgba(40, 36, 32, 0.6);
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .nav-item[data-section="overview"] { background: rgba(255, 80, 80, 0.12); border-color: rgba(255, 80, 80, 0.3); }
[data-theme="dark"] .nav-item[data-section="tab-onboarding"] { background: rgba(255, 150, 50, 0.12); border-color: rgba(255, 150, 50, 0.3); }
[data-theme="dark"] .nav-item[data-section="tab-economy"] { background: rgba(255, 230, 50, 0.1); border-color: rgba(255, 230, 50, 0.3); }
[data-theme="dark"] .nav-item[data-section="tab-dating"] { background: rgba(80, 255, 120, 0.12); border-color: rgba(80, 255, 120, 0.3); }
[data-theme="dark"] .nav-item[data-section="tab-marriage"] { background: rgba(80, 180, 255, 0.12); border-color: rgba(80, 180, 255, 0.3); }
[data-theme="dark"] .nav-item[data-section="tab-family"] { background: rgba(180, 120, 255, 0.12); border-color: rgba(180, 120, 255, 0.3); }
[data-theme="dark"] .nav-item.nav-external { background: rgba(255, 100, 255, 0.12); border-color: rgba(255, 100, 255, 0.3); }

[data-theme="dark"] .nav-item:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  filter: brightness(1.4) saturate(1.5);
}

[data-theme="dark"] .nav-item.active {
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.05);
  border-width: 1.5px;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.18);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.85;
  color: var(--text-primary);
  background: #f5f0eb;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* ============================================
   Background GIF + Overlay
   ============================================ */
.bg-gif {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -2;
  pointer-events: none;
}

.bg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* ============================================
   Sidebar Overlay (Mobile)
   ============================================ */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44, 37, 32, 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: var(--z-overlay);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.visible {
  opacity: 1;
  visibility: visible;
}

/* ============================================
   Sidebar
   ============================================ */
.docs-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  height: 100dvh;
  background: var(--docs-sidebar-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  z-index: var(--z-sidebar);
  overflow: hidden;
  transition: transform 0.35s var(--ease-out);
}

/* -- Sidebar Header -- */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--docs-border);
  flex-shrink: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  transition: opacity 0.2s ease;
}

.sidebar-logo:hover {
  opacity: 0.8;
}

.sidebar-logo-img {
    width: 38px;
    height: 38px;
    border-radius: 50% !important;
    object-fit: cover;
  box-shadow: var(--shadow-sm);
}

.sidebar-logo-text {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.sidebar-close-btn {
  display: none;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  border-radius: 6px;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.sidebar-close-btn:hover {
  background: var(--accent-primary-light);
  color: var(--accent-primary);
}

/* -- Search Box -- */
.sidebar-search {
  padding: 12px 16px;
  flex-shrink: 0;
}

.sidebar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--docs-bg);
  border: 1px solid var(--docs-border);
  border-radius: 8px;
  padding: 8px 12px;
  transition: all 0.2s ease;
}

.sidebar-search:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-primary-light);
}

.sidebar-search svg {
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.sidebar-search input {
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  width: 100%;
}

.sidebar-search input::placeholder {
  color: var(--text-tertiary);
}

/* -- Sidebar Nav -- */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(44, 37, 32, 0.08) transparent;
}

.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(44, 37, 32, 0.1);
  border-radius: 4px;
}

/* -- Nav Group -- */
.nav-group {
  margin-bottom: 8px;
}

.nav-group-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--text-tertiary);
  padding: 14px 8px 6px;
  text-transform: uppercase;
}

.nav-group-label svg {
  opacity: 0.5;
}

/* -- Nav Item -- */
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.5);
  margin-bottom: 10px;
  transition: all 0.3s var(--ease-spring);
  cursor: pointer;
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
  touch-action: manipulation;
}

/* Bảng màu 7 sắc cầu vồng Pastel cho từng card */
.nav-item[data-section="overview"] { background: rgba(255, 200, 200, 0.6); border-color: rgba(232, 99, 122, 0.25); }
.nav-item[data-section="tab-onboarding"] { background: rgba(255, 225, 180, 0.6); border-color: rgba(212, 160, 60, 0.25); }
.nav-item[data-section="tab-economy"] { background: rgba(255, 245, 180, 0.6); border-color: rgba(212, 200, 60, 0.25); }
.nav-item[data-section="tab-dating"] { background: rgba(200, 255, 200, 0.6); border-color: rgba(107, 181, 160, 0.25); }
.nav-item[data-section="tab-marriage"] { background: rgba(200, 230, 255, 0.6); border-color: rgba(91, 143, 217, 0.25); }
.nav-item[data-section="tab-family"] { background: rgba(230, 200, 255, 0.6); border-color: rgba(140, 100, 255, 0.25); }
.nav-item.nav-external { background: rgba(255, 200, 255, 0.6); border-color: rgba(232, 99, 255, 0.25); }

.nav-item:hover {
  transform: translateX(8px) scale(1.04);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  filter: brightness(1.05) saturate(1.2);
}

.nav-item[data-section="tab-onboarding"]:hover { color: var(--accent-blue); border-color: var(--accent-blue); }
.nav-item[data-section="tab-economy"]:hover { color: var(--accent-secondary); border-color: var(--accent-secondary); }
.nav-item[data-section="tab-dating"]:hover { color: var(--accent-primary); border-color: var(--accent-primary); }
.nav-item[data-section="tab-marriage"]:hover { color: var(--accent-primary); border-color: var(--accent-primary); }
.nav-item[data-section="tab-family"]:hover { color: var(--accent-amber); border-color: var(--accent-amber); }

.nav-item svg {
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.nav-item:hover svg {
  opacity: 0.8;
}

.nav-item.active {
  background: var(--accent-primary);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(232, 99, 122, 0.25);
  border-color: var(--accent-primary);
  transform: scale(1.03);
}

.nav-item.active svg {
  opacity: 1;
  color: #fff;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.nav-item.active::before {
  display: none; /* Khong can underline nua vi da co card style */
}

.nav-external::after {
  content: '';
  margin-left: auto;
  width: 10px;
  height: 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%239e9890' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.6;
}

/* -- Sidebar Footer -- */
.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--docs-border);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.sidebar-footer-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-tertiary);
  opacity: 0.5;
}

/* -- Theme Toggle Button -- */
.theme-toggle {
  margin-left: auto;
  width: 36px;
  height: 36px;
  border: 1px solid var(--docs-border);
  background: var(--glass-bg);
  color: var(--text-secondary);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: scale(1.08);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-icon {
  position: absolute;
  transition: all 0.4s var(--ease-spring);
}

/* Mac dinh: sang -> hien mat troi, an mat trang */
.theme-icon-light {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.theme-icon-dark {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

/* Dark mode: hien mat trang, an mat troi */
[data-theme="dark"] .theme-icon-light {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

[data-theme="dark"] .theme-icon-dark {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* ============================================
   Main Content Area
   ============================================ */
.docs-main {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* -- Topbar (Mobile Only) -- */
.docs-topbar {
  display: none;
  position: sticky;
  top: 0;
  height: var(--topbar-height);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid var(--glass-border);
  padding: 0 18px;
  align-items: center;
  justify-content: space-between;
  z-index: var(--z-topbar);
}

.topbar-menu-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  touch-action: manipulation;
}

.topbar-menu-btn:hover {
  background: rgba(44, 37, 32, 0.06);
}

.topbar-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.topbar-cta {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent-primary-light);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.topbar-cta:hover {
  background: var(--accent-primary);
  color: var(--text-inverse);
}

/* -- Content -- */
.docs-content {
  flex: 1;
  width: 100%;
  padding: 44px 60px 0;
}

/* ============================================
   Sections (Pages)
   ============================================ */
.docs-section {
  display: none;
  animation: docsPageFadeIn 0.4s var(--ease-out) forwards;
}

.docs-section.active {
  display: block;
}

@keyframes docsPageFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* -- Breadcrumb -- */
.docs-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: var(--text-tertiary);
  margin-bottom: 14px;
  font-weight: 500;
}

.docs-breadcrumb svg {
  opacity: 0.4;
}

/* -- Page Title -- */
.docs-page-title {
  font-family: var(--font-heading);
  font-size: 48px;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 12px;
}

.docs-page-desc {
  font-size: 21px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 800px;
}

/* ============================================
   Callouts (Info / Warning / Danger)
   ============================================ */
.docs-callout {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 22px;
  border-left: 4px solid;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.docs-callout svg {
  flex-shrink: 0;
  margin-top: 3px;
}

.docs-callout code {
  background: rgba(255, 255, 255, 0.7);
  padding: 2px 7px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
}

.docs-callout-info {
  background: var(--accent-blue-light);
  border-color: var(--accent-blue);
  color: #3b5e8c;
}

.docs-callout-info svg {
  color: var(--accent-blue);
}

.docs-callout-warning {
  background: var(--accent-amber-light);
  border-color: var(--accent-amber);
  color: #7a6020;
}

.docs-callout-warning svg {
  color: var(--accent-amber);
}

.docs-callout-danger {
  background: var(--accent-danger-light);
  border-color: var(--accent-danger);
  color: #7a2020;
}

.docs-callout-danger svg {
  color: var(--accent-danger);
}

/* ============================================
   Hero Banner (Overview Page)
   ============================================ */
.docs-hero-banner {
  display: flex;
  align-items: center;
  gap: 40px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-radius: 24px;
  padding: 40px 50px;
  margin: 32px auto 50px; /* Can giua can doi */
  max-width: 1000px; /* Thu hep chieu ngang */
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  transition: all 0.5s var(--ease-spring);
  border: 1.5px solid rgba(255, 255, 255, 0.8);
  z-index: 10;
}

.docs-hero-banner:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 30px 60px rgba(255, 255, 255, 0.4), 0 0 30px rgba(255, 255, 255, 0.5);
  border-color: #ffffff;
}

[data-theme="dark"] .docs-hero-banner {
  background: rgba(30, 28, 26, 0.95);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .docs-hero-banner:hover {
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 255, 255, 0.1);
}

.heart-particle {
  position: absolute;
  pointer-events: none;
  font-size: 20px;
  z-index: 100;
  animation: heartFly 1.5s ease-out forwards;
}

@keyframes heartFly {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}

/* Ornament circles removed to prevent overflow */


.docs-hero-img {
  width: 240px;
  height: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 12px 32px rgba(232, 99, 122, 0.25));
  animation: heroFloat 3.5s ease-in-out infinite;
  transition: transform 0.5s var(--ease-spring);
}

.docs-hero-banner:hover .docs-hero-img {
  transform: scale(1.1) rotate(2deg);
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.docs-hero-text h2 {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.docs-hero-text p {
  font-size: 19px;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* -- Section H2 -- */
.docs-section h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--text-primary);
  margin: 40px 0 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--docs-border);
}

#overview h2 {
  text-align: center;
  border-bottom: none;
  font-size: 32px;
  margin-top: 60px;
}

#overview h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--accent-primary);
  margin: 12px auto 0;
  border-radius: 2px;
}

/* ============================================
   Hero Search Bar
   ============================================ */
.hero-search-wrapper {
  max-width: 820px;
  margin: -20px auto 40px;
  position: relative;
  z-index: 15;
}

.hero-search-box {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 18px;
  padding: 18px 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08), 0 0 12px rgba(232, 99, 122, 0.1);
  transition: all 0.4s var(--ease-spring);
}

.hero-search-box:focus-within {
  transform: translateY(-4px) scale(1.02);
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(232, 99, 122, 0.15), 0 0 0 4px rgba(232, 99, 122, 0.08);
  border-color: var(--accent-primary);
}

.hero-search-box svg {
  color: var(--accent-primary);
  flex-shrink: 0;
}

.hero-search-box input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.hero-search-box input::placeholder {
  color: var(--text-tertiary);
  font-weight: 500;
}

.search-hint {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 600;
  background: rgba(0, 0, 0, 0.06);
  padding: 6px 12px;
  border-radius: 8px;
  white-space: nowrap;
}

[data-theme="dark"] .hero-search-box {
  background: rgba(30, 28, 26, 0.92);
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .hero-search-box:focus-within {
  background: rgba(40, 38, 36, 1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 0 4px rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .search-hint {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

/* ============================================
   Feature Grid (Overview)
   ============================================ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  justify-content: center;
  gap: 24px;
  margin: 0 auto 40px;
  max-width: 1000px; /* Thu hep lai de tap trung vao giua view hon */
}

.feature-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.macos-card {
  padding-top: 36px !important;
}

.macos-dots {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 6px;
  z-index: 5;
}

.macos-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  opacity: 0.75;
}

.macos-dots span:nth-child(1) { background: #ff5f56; }
.macos-dots span:nth-child(2) { background: #ffbd2e; }
.macos-dots span:nth-child(3) { background: #27c93f; }

.feature-card:hover.macos-card {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .feature-card:hover.macos-card {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.feature-card.is-pending {
  cursor: default;
  opacity: 0.8;
}

.feature-card.is-pending:hover {
  transform: none;
  border-color: var(--glass-border);
}

.feature-card.is-pending .feature-card-icon {
  background: var(--text-tertiary);
  opacity: 0.6;
}

.feature-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  opacity: 0;
  background: linear-gradient(135deg, var(--accent-primary-light), transparent);
  transition: opacity 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
}

.feature-card:hover::after {
  opacity: 1;
}

.feature-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--accent-primary-light);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
  transition: all 0.3s var(--ease-spring);
}

.feature-card:hover .feature-card-icon {
  transform: scale(1.08) rotate(-3deg);
  background: var(--accent-primary);
  color: var(--text-inverse);
}

.feature-card h3 {
  font-family: var(--font-heading);
  font-size: 21px;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.feature-card p {
  font-size: 16.5px;
  color: var(--text-primary); /* Đổi sang màu đậm hơn cho rõ */
  line-height: 1.6;
  font-weight: 500; /* Làm dày nét chữ một chút */
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

/* ============================================
   Command Blocks
   ============================================ */
.command-block {
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 24px;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
}

.command-block:hover {
  border-color: var(--docs-border-hover);
  box-shadow: var(--shadow-md);
}

.command-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.command-header svg {
  color: var(--accent-primary);
  flex-shrink: 0;
}

.command-header h3 {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 900;
  color: var(--text-primary);
}

.command-syntax {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 16px 24px;
  margin-bottom: 20px;
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.command-syntax code {
  background: var(--accent-primary-light);
  color: var(--accent-primary);
  padding: 4px 12px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  border: 1px solid rgba(232, 99, 122, 0.15);
}

.command-steps {
  background: rgba(255, 255, 255, 0.72);
  border-radius: 12px;
  padding: 18px 22px;
}

.command-steps h4 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.command-steps ol {
  margin: 0;
  padding-left: 24px;
}

.command-steps li {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 12px;
}

.command-steps li:last-child {
  margin-bottom: 0;
}

.command-steps li strong {
  color: var(--text-primary);
}

.command-steps li em {
  color: var(--accent-primary);
  font-style: normal;
  font-weight: 500;
}

.command-steps code {
  background: var(--accent-primary-light);
  color: var(--accent-primary);
  padding: 2px 8px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
}

/* ============================================
   Page Navigation (Prev / Next)
   ============================================ */
.docs-page-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--docs-border);
}

.page-nav-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.25s var(--ease-out);
  flex: 1;
  max-width: 48%;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.page-nav-btn:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.page-nav-btn svg {
  color: var(--accent-primary);
  flex-shrink: 0;
}

.page-nav-prev {
  justify-content: flex-start;
}

.page-nav-next {
  justify-content: flex-end;
  margin-left: auto;
  text-align: right;
}

.page-nav-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.page-nav-title {
  display: block;
  font-family: var(--font-heading);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 3px;
}

/* ============================================
   Footer
   ============================================ */
.docs-footer {
  padding: 36px 0;
  margin-top: 52px;
  border-top: 1px solid var(--docs-border);
  text-align: center;
  font-size: 14px;
  color: var(--text-tertiary);
}

.docs-footer strong {
  color: var(--accent-primary);
  font-family: var(--font-heading);
  font-weight: 800;
}

/* ============================================
   Responsive: Tablet (<=1024px)
   ============================================ */
@media (max-width: 1024px) {
  .docs-content {
    padding: 32px 32px 0;
  }
}

/* ============================================
   Responsive: Mobile (<=768px)
   ============================================ */
@media (max-width: 768px) {
  /* -- Sidebar: Drawer tu trai -- */
  .docs-sidebar {
    transform: translateX(-100%);
    box-shadow: none;
    width: 300px;
  }

  .docs-sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .sidebar-close-btn {
    display: flex;
  }

  /* -- Main -- */
  .docs-main {
    margin-left: 0;
  }

  .docs-topbar {
    display: flex;
  }

  .docs-content {
    padding: 24px 18px 0;
  }

  /* -- Typography -- */
  .docs-page-title {
    font-size: 1.7rem;
  }

  .docs-section h2 {
    font-size: 1.2rem;
  }

  /* -- Hero Banner -- */
  .docs-hero-banner {
    flex-direction: column;
    text-align: center;
    padding: 24px 20px;
    gap: 16px;
  }

  .docs-hero-img {
    width: 72px;
  }

  .hero-search-wrapper {
    max-width: 100%;
    width: 100%;
    margin: -12px auto 34px;
    padding: 0 12px;
  }

  .hero-search-box {
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
  }

  .hero-search-box input {
    width: 100%;
  }

  .search-hint {
    width: 100%;
    text-align: center;
    white-space: normal;
  }

  /* -- Feature Grid -- */
  .feature-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .feature-card {
    padding: 16px;
  }

  /* -- Command Blocks -- */
  .command-block {
    padding: 18px 16px;
  }

  .command-header h3 {
    font-size: 1.1rem;
  }

  .command-steps {
    padding: 14px 16px;
  }

  /* -- Page Nav -- */
  .docs-page-nav {
    flex-direction: column;
    gap: 10px;
    margin-top: 32px;
  }

  .page-nav-btn {
    max-width: 100%;
  }

  .page-nav-next {
    margin-left: 0;
  }

  /* -- Callout -- */
  .docs-callout {
    padding: 12px 14px;
    font-size: 13px;
  }
}

/* ============================================
   Responsive: Small mobile (<=375px)
   ============================================ */
@media (max-width: 375px) {
  .docs-content {
    padding: 20px 14px 0;
  }

  .docs-page-title {
    font-size: 1.35rem;
  }

  .command-block {
    padding: 14px 12px;
  }
}

/* ============================================
   Focus & Accessibility
   ============================================ */
:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* -- Reduced Motion -- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   Search Highlighting
   ============================================ */
.nav-item.search-hidden {
  display: none;
}

.nav-group.search-hidden {
  display: none;
}

/* -- Staggered entry animation -- */
.command-block {
  opacity: 0;
  animation: commandSlideIn 0.5s var(--ease-out) forwards;
}

.command-block:nth-child(1) { animation-delay: 0.05s; }
.command-block:nth-child(2) { animation-delay: 0.12s; }
.command-block:nth-child(3) { animation-delay: 0.19s; }
.command-block:nth-child(4) { animation-delay: 0.26s; }

@keyframes commandSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Background GIF da duoc them truc tiep vao HTML */

/* ============================================
   Scrollbar
   ============================================ */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(44, 37, 32, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(44, 37, 32, 0.18);
}
