/* === Bee's Hub — Catppuccin-inspired dark theme === */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #1e1e2e;
  --bg-dark: #11111b;
  --bg-card: #181825;
  --border: #313244;
  --text: #cdd6f4;
  --text-muted: #a6adc8;
  --text-dim: #6c7086;
  --text-faint: #585b70;
  --pink: #f5c2e7;
  --yellow: #f9e2af;
  --cyan: #89dceb;
  --blue: #89b4fa;
  --topnav-h: 48px;
  --sidebar-w: 240px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
}

/* --- Top Nav --- */
.topnav {
  background: var(--bg-dark);
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--topnav-h);
  overflow-x: auto;
}
.topnav-brand {
  color: var(--pink);
  font-weight: 700;
  font-size: 15px;
  margin-right: 20px;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}
.topnav-tab {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 14px 16px;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.topnav-tab:hover { color: var(--text); }
.topnav-tab.active {
  color: var(--yellow);
  border-bottom-color: var(--yellow);
}

/* --- Layout --- */
.app {
  display: flex;
  margin-top: var(--topnav-h);
  min-height: calc(100vh - var(--topnav-h));
}

/* --- Sidebar --- */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-dark);
  border-right: 1px solid var(--border);
  padding: 16px 0;
  position: fixed;
  top: var(--topnav-h);
  left: 0;
  height: calc(100vh - var(--topnav-h));
  overflow-y: auto;
  flex-shrink: 0;
}
.nav-group { padding: 4px 0; }
.nav-group-title {
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 16px;
}
.nav-link {
  display: block;
  color: var(--cyan);
  text-decoration: none;
  font-size: 13px;
  padding: 5px 16px 5px 24px;
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover {
  background: var(--bg);
  color: var(--yellow);
}
.nav-divider {
  border-top: 1px solid var(--border);
  margin: 8px 16px;
}
.nav-ext-link {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
  padding: 4px 16px 4px 24px;
  transition: background 0.15s, color 0.15s;
}
.nav-ext-link:hover {
  background: var(--bg);
  color: var(--cyan);
}
.nav-ext-link::after {
  content: " ↗";
  font-size: 10px;
  color: var(--text-faint);
}

/* --- Main content --- */
.main {
  margin-left: var(--sidebar-w);
  padding: 24px;
  max-width: 960px;
  flex: 1;
}
.page-title {
  text-align: center;
  color: var(--pink);
  font-size: 24px;
  padding: 16px 20px;
  background: var(--border);
  border-radius: 12px;
  margin-bottom: 24px;
}
.page-title .subtitle {
  font-size: 13px;
  display: block;
  color: var(--text-dim);
  margin-top: 6px;
  font-weight: normal;
}

/* --- Content sections --- */
.section {
  margin-bottom: 20px;
  background: var(--bg-card);
  border-radius: 10px;
  padding: 16px 20px;
  border-left: 3px solid var(--yellow);
  scroll-margin-top: 64px;
}
.section-title {
  color: var(--yellow);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* Command rows (used inside sections) */
.cmd-row {
  display: flex;
  align-items: baseline;
  padding: 5px 0;
}
.cmd {
  color: var(--cyan);
  font-family: 'Menlo', 'SF Mono', 'Courier New', monospace;
  font-size: 14px;
  font-weight: 600;
  min-width: 240px;
  flex-shrink: 0;
}
.desc {
  color: var(--text-muted);
  font-size: 13px;
}
.tip {
  color: var(--text-dim);
  font-style: italic;
  font-size: 12px;
  padding: 4px 0 2px 12px;
}

/* Grid for two-column layout */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* App cards */
.app-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.app-card {
  background: var(--bg-card);
  border-radius: 10px;
  padding: 16px 20px;
  border-left: 3px solid var(--blue);
  scroll-margin-top: 64px;
}
.app-card-title {
  color: var(--blue);
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 6px;
}
.app-card-desc {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}
.app-card a {
  color: var(--cyan);
  text-decoration: none;
}
.app-card a:hover {
  color: var(--yellow);
  text-decoration: underline;
}
.app-card-links {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.app-card-link {
  color: var(--text-muted) !important;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none !important;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.app-card-link:hover {
  color: var(--yellow) !important;
  border-color: var(--yellow);
  background: var(--bg-dark);
}

/* Markdown content styling */
.content h2 {
  color: var(--yellow);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: 24px 0 12px;
}
.content h2:first-child { margin-top: 0; }
.content p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 8px;
}
.content ul, .content ol {
  color: var(--text-muted);
  font-size: 13px;
  padding-left: 20px;
  margin-bottom: 12px;
}
.content li { padding: 2px 0; }
.content strong {
  color: var(--pink);
  font-weight: 700;
  font-size: 14px;
}
.content a {
  color: var(--cyan);
  text-decoration: none;
}
.content a:hover {
  color: var(--yellow);
}
.content code {
  color: var(--cyan);
  font-family: 'Menlo', 'SF Mono', 'Courier New', monospace;
  font-size: 13px;
  background: var(--bg-dark);
  padding: 1px 5px;
  border-radius: 4px;
}
.content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}
.content th {
  color: var(--yellow);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}
.content td {
  padding: 6px 12px;
  border-bottom: 1px solid #232336;
  font-size: 13px;
}
.content td:first-child {
  color: var(--cyan);
  font-family: 'Menlo', 'SF Mono', 'Courier New', monospace;
  font-weight: 600;
  white-space: nowrap;
}
.content td:last-child {
  color: var(--text-muted);
}
.content blockquote {
  border-left: 3px solid var(--text-dim);
  padding: 4px 12px;
  color: var(--text-dim);
  font-style: italic;
  font-size: 12px;
  margin: 8px 0;
}

.footer {
  text-align: center;
  color: var(--text-faint);
  font-size: 11px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.placeholder {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-faint);
  font-size: 14px;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
}
@media (max-width: 700px) {
  .grid, .app-grid { grid-template-columns: 1fr; }
  .cmd { min-width: 160px; }
  .topnav { padding: 0 8px; }
  .topnav-tab { padding: 14px 10px; font-size: 12px; }
}
@media print {
  .topnav, .sidebar { display: none; }
  .app { margin-top: 0; }
  .main { margin-left: 0; }
  body { background: var(--bg) !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .section { break-inside: avoid; }
}

/* Page navigation bar */
.page-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  padding: 10px 16px;
  background: var(--bg-card);
  border-radius: 10px;
  border: 1px solid var(--border);
}
.page-nav-link {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.page-nav-link:hover {
  color: var(--yellow);
  border-color: var(--yellow);
  background: var(--bg-dark);
}
