/* ==========================================================================
   FRONTHUB DESIGN SYSTEM  THE OFFICIAL FRONTLANG REGISTRY
   Theme: Obsidian Dark / Electric Cyan & Violet Glow / Glassmorphism
   ========================================================================== */

:root {
  --bg-main: #070a12;
  --bg-surface: #0d121f;
  --bg-card: rgba(16, 23, 40, 0.75);
  --bg-card-hover: rgba(23, 33, 56, 0.85);
  --bg-card-alt: #121929;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(56, 189, 248, 0.15);
  --border-card-hover: rgba(129, 140, 248, 0.4);

  --accent-cyan: #38bdf8;
  --accent-cyan-glow: rgba(56, 189, 248, 0.25);
  --accent-violet: #818cf8;
  --accent-purple: #c084fc;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-code: #38bdf8;

  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  --shadow-glow: 0 0 30px rgba(56, 189, 248, 0.2);
  --shadow-violet-glow: 0 0 30px rgba(129, 140, 248, 0.25);
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Ambient Glow Orbs */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
  transition: opacity 0.5s ease;
}

.bg-glow-1 {
  width: 550px;
  height: 550px;
  top: -100px;
  left: 10%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.35) 0%, rgba(14, 165, 233, 0) 70%);
}

.bg-glow-2 {
  width: 600px;
  height: 600px;
  top: 15%;
  right: -100px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.3) 0%, rgba(129, 140, 248, 0) 70%);
}

.bg-glow-3 {
  width: 700px;
  height: 500px;
  bottom: 0;
  left: 20%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
}

.app-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ==========================================
   NAVBAR
   ========================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  background: rgba(7, 10, 18, 0.82);
  border-bottom: 1px solid var(--border-subtle);
  padding: 14px 0;
  transition: all 0.25s ease;
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #070a12;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

.brand-logo.small {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
}

.brand-text {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(120deg, #ffffff 30%, #94a3b8 100%);
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

/* Nav Search Bar */
.nav-search-wrap {
  flex: 1;
  max-width: 520px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

.nav-search-input {
  width: 100%;
  height: 42px;
  padding: 0 44px 0 42px;
  border-radius: var(--radius-full);
  background: rgba(18, 25, 43, 0.7);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.nav-search-input:focus {
  border-color: var(--accent-cyan);
  background: rgba(22, 31, 53, 0.95);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.25);
}

.search-shortcut {
  position: absolute;
  right: 14px;
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

.clear-search-btn {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
}

.clear-search-btn:hover {
  color: var(--text-primary);
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-emerald);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn.large-btn {
  padding: 13px 26px;
  font-size: 15px;
  border-radius: var(--radius-lg);
}

.btn.primary-btn {
  background: linear-gradient(135deg, #0284c7 0%, #6366f1 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.35);
}

.btn.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(2, 132, 199, 0.5);
  background: linear-gradient(135deg, #0ea5e9 0%, #818cf8 100%);
}

.btn.accent-btn {
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}

.btn.accent-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(16, 185, 129, 0.5);
  background: linear-gradient(135deg, #059669 0%, #0891b2 100%);
}

.btn.secondary-btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn.ghost-btn {
  background: transparent;
  color: var(--text-secondary);
}

.btn.ghost-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.btn.icon-btn {
  padding: 8px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

.btn.icon-btn:hover {
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.15);
}

.btn.text-btn {
  background: none;
  color: var(--accent-cyan);
  padding: 0;
  font-size: 13px;
}

.btn.text-btn:hover {
  text-decoration: underline;
}

.full-width {
  width: 100%;
}

/* ==========================================
   MAIN CONTENT & HERO SECTION
   ========================================== */
.main-content {
  flex: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

.hero-section {
  padding: 30px 0 60px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 6px;
  border-radius: var(--radius-full);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.hero-pill-badge {
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  color: #070a12;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 48px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 18px;
}

.gradient-text {
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 580px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border-subtle);
}

/* Hero Terminal Card */
.hero-terminal-card {
  background: rgba(13, 18, 31, 0.85);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-card), var(--shadow-glow);
  backdrop-filter: blur(20px);
  overflow: hidden;
  transition: transform 0.3s ease;
}

.terminal-header {
  background: rgba(18, 25, 43, 0.95);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.copy-terminal-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.copy-terminal-btn:hover {
  color: var(--accent-cyan);
}

.terminal-tabs {
  display: flex;
  background: rgba(10, 14, 25, 0.6);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 8px;
}

.term-tab {
  background: transparent;
  border: none;
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}

.term-tab.active {
  color: var(--accent-cyan);
}

.term-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 8px;
  right: 8px;
  height: 2px;
  background: var(--accent-cyan);
  border-radius: 2px;
}

.terminal-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: #e2e8f0;
  min-height: 240px;
  overflow-x: auto;
}

.term-line {
  margin-bottom: 4px;
  display: flex;
  gap: 8px;
}

.term-prompt {
  color: var(--accent-cyan);
  user-select: none;
}

.term-cmd {
  color: #ffffff;
  font-weight: 600;
}

.term-success {
  color: var(--accent-emerald);
}

.term-dim {
  color: var(--text-muted);
}

.term-highlight {
  color: var(--accent-violet);
}

/* ==========================================
   EXPLORER & PACKAGE GRID
   ========================================== */
.explorer-section {
  margin-top: 20px;
}

.explorer-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 20px;
  flex-wrap: wrap;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 15px;
}

.category-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.filter-chip.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  font-weight: 600;
}

.search-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* Package Grid */
.package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
}

.package-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-card);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.package-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.package-card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  border-color: var(--border-card-hover);
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.6), 0 0 20px rgba(129, 140, 248, 0.2);
}

.package-card:hover::before {
  opacity: 1;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.card-pkg-name {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.version-pill {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
}

.verified-icon {
  color: var(--accent-cyan);
}

.card-desc {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 18px;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
}

.card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.tag-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  font-size: 13px;
  color: var(--text-muted);
}

.card-stats {
  display: flex;
  align-items: center;
  gap: 14px;
}

.card-stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

.quick-install-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
}

.quick-install-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #ffffff;
}

/* Empty state */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-subtle);
}

.empty-state h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

/* ==========================================
   PACKAGE DETAIL VIEW
   ========================================== */
.package-detail-view {
  animation: fadeIn 0.3s ease;
}

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

.back-to-grid-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--accent-cyan);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 24px;
  transition: transform 0.2s ease;
}

.back-to-grid-btn:hover {
  transform: translateX(-4px);
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
}

.detail-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(20px);
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
}

.detail-hero-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
}

.detail-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.detail-pkg-name {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.detail-version-badge {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  padding: 4px 10px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border-radius: var(--radius-full);
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.1);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.detail-pkg-desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.detail-quick-stats {
  display: flex;
  gap: 12px;
}

.stat-bubble {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.detail-install-box {
  background: rgba(10, 14, 25, 0.8);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 16px;
}

.install-prompt-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.install-code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(0, 0, 0, 0.4);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 14px;
}

.terminal-prefix {
  color: var(--accent-cyan);
  user-select: none;
}

/* Tabs */
.detail-nav-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 24px;
}

.detail-tab-btn {
  padding: 12px 20px;
  background: transparent;
  border: none;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.detail-tab-btn:hover {
  color: var(--text-primary);
}

.detail-tab-btn.active {
  color: var(--accent-cyan);
}

.detail-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-cyan);
}

.detail-tab-content {
  display: none;
}

.detail-tab-content.active {
  display: block;
}

/* Markdown Renderer Styling */
.markdown-body {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  line-height: 1.7;
  color: #cbd5e1;
}

.markdown-body h1, .markdown-body h2, .markdown-body h3 {
  font-family: var(--font-heading);
  color: #ffffff;
  margin-top: 24px;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.markdown-body h1 { font-size: 28px; border-bottom: 1px solid var(--border-subtle); padding-bottom: 8px; }
.markdown-body h2 { font-size: 22px; }
.markdown-body h3 { font-size: 18px; }

.markdown-body p { margin-bottom: 16px; }

.markdown-body code {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-cyan);
  border-radius: 4px;
}

.markdown-body pre {
  background: #090d16;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  overflow-x: auto;
  margin: 16px 0;
}

.markdown-body pre code {
  padding: 0;
  background: transparent;
  color: #f1f5f9;
}

.markdown-body ul, .markdown-body ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.markdown-body li { margin-bottom: 6px; }

/* Versions Table */
.versions-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.versions-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.versions-table th {
  background: rgba(18, 25, 43, 0.9);
  padding: 14px 18px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-subtle);
}

.versions-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.versions-table tr:last-child td {
  border-bottom: none;
}

.version-num {
  font-family: var(--font-mono);
  font-weight: 600;
  color: #ffffff;
}

.checksum-clip {
  cursor: pointer;
  font-size: 12px;
  color: var(--accent-cyan);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.checksum-clip:hover {
  text-decoration: underline;
}

/* Dependencies View */
.dep-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 12px;
}

.dep-name {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
}

.dep-req {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 3px 8px;
  background: rgba(129, 140, 248, 0.15);
  color: var(--accent-violet);
  border-radius: 4px;
}

/* Package File Tree */
.file-tree-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.tree-header {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.tree-node {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #e2e8f0;
}

.tree-node.child { padding-left: 24px; }
.tree-node.grandchild { padding-left: 48px; }

/* Sidebar */
.detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(16px);
}

.sidebar-heading {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  color: #ffffff;
}

.sidebar-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13px;
}

.meta-row:last-child { border-bottom: none; }

.meta-label { color: var(--text-muted); }
.meta-value { font-weight: 500; color: var(--text-primary); }

.badge-license {
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 12px;
}

.tag-cloud {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ==========================================
   MODAL DIALOGS (<dialog>)
   ========================================== */
.custom-dialog {
  border: none;
  background: transparent;
  padding: 0;
  max-width: 600px;
  width: 90%;
  margin: auto;
  border-radius: var(--radius-xl);
  outline: none;
}

.custom-dialog::backdrop {
  background: rgba(5, 7, 13, 0.85);
  backdrop-filter: blur(12px);
  animation: fadeIn 0.2s ease;
}

.dialog-card {
  background: #0d1220;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), var(--shadow-glow);
  padding: 32px;
  color: var(--text-primary);
}

.dialog-card.large {
  max-width: 760px;
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.dialog-title-group {
  display: flex;
  gap: 14px;
}

.dialog-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dialog-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.dialog-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

.dialog-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

.dialog-close-btn:hover {
  color: var(--text-primary);
}

.input-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.form-input {
  flex: 1;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  background: rgba(18, 25, 43, 0.9);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
}

.form-input:focus {
  border-color: var(--accent-cyan);
}

.token-result-box {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 24px;
}

.token-alert-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-emerald);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.token-display-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.4);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 13px;
  color: #ffffff;
  margin-bottom: 8px;
}

.token-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.workflow-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.step-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.2);
  color: var(--accent-cyan);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}

.step-code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-cyan);
}

.dialog-divider {
  border: none;
  height: 1px;
  background: var(--border-subtle);
  margin: 24px 0;
}

.sub-heading {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.sub-text {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* Dropzone */
.dropzone-box {
  border: 2px dashed var(--border-card);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  cursor: pointer;
  background: rgba(56, 189, 248, 0.02);
  color: var(--accent-cyan);
  transition: all 0.2s ease;
}

.dropzone-box:hover {
  background: rgba(56, 189, 248, 0.08);
  border-color: var(--accent-cyan);
}

.dropzone-label {
  font-size: 14px;
  color: var(--text-primary);
  margin-top: 8px;
}

.dropzone-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.upload-status {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 500;
}

/* CLI Guide Modal */
.cli-guide-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cli-cmd-block {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}

.cli-cmd-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.cmd-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
}

.cli-cmd-header code {
  font-family: var(--font-mono);
  font-size: 14px;
  color: #ffffff;
  font-weight: 600;
}

.cmd-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ==========================================
   TOAST NOTIFICATIONS
   ========================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: #111827;
  border: 1px solid var(--border-card);
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), var(--shadow-glow);
  animation: slideIn 0.25s ease;
  transition: opacity 0.3s ease;
}

@keyframes slideIn {
  from { transform: translateX(50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.success {
  border-color: rgba(16, 185, 129, 0.4);
}
.toast.success svg { color: var(--accent-emerald); }

/* ==========================================
   FOOTER
   ========================================== */
.app-footer {
  border-top: 1px solid var(--border-subtle);
  background: rgba(7, 10, 18, 0.9);
  padding: 32px 0;
  margin-top: auto;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 14px;
  color: var(--text-muted);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent-cyan);
}

/* ==========================================
   RESPONSIVE QUERIES
   ========================================== */
@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .detail-layout {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 36px;
  }
}

@media (max-width: 640px) {
  .nav-search-wrap {
    display: none;
  }
  .hero-stats {
    flex-wrap: wrap;
    gap: 16px;
  }
  .stat-divider {
    display: none;
  }
  .package-grid {
    grid-template-columns: 1fr;
  }
  .detail-hero-header {
    flex-direction: column;
  }
}

/* ==========================================================================
   HERO QUICK-INSTALL STRIP & DOWNLOAD DIALOG STYLES
   ========================================================================== */
.hero-install-box {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(13, 18, 31, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-full);
  padding: 6px 14px 6px 8px;
  margin-top: 18px;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(56, 189, 248, 0.15);
  max-width: 100%;
}

.install-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--accent-cyan);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.install-cmd {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #e2e8f0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-install-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.copy-install-btn:hover {
  background: var(--accent-cyan);
  color: #070a12;
  box-shadow: 0 0 12px var(--accent-cyan);
}

/* Download Dialog */
.download-icon-glow {
  background: rgba(16, 185, 129, 0.15) !important;
  color: var(--accent-emerald) !important;
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.25);
}

.download-guide-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
}

.download-method-card {
  background: rgba(18, 25, 43, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s;
}

.download-method-card.featured {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(6, 182, 212, 0.08) 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.1);
}

.method-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.method-badge.secondary {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border-color: rgba(56, 189, 248, 0.3);
}

.method-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}

.method-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.method-code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #060911;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.method-code-box code {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--accent-cyan);
}

.download-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.download-action-btn {
  text-decoration: none;
  font-size: 13.5px;
  padding: 10px 18px;
}

.checksum-info-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(10, 14, 25, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-top: 4px;
}

.checksum-tag {
  font-size: 10px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-muted);
}

.checksum-string {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-secondary);
  word-break: break-all;
  flex: 1;
}

.copy-tag-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}

.copy-tag-btn:hover {
  color: var(--accent-cyan);
}

.quick-terminal-snippet {
  background: #060911;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quick-terminal-snippet .cmd-prompt {
  color: var(--accent-cyan);
  font-weight: 700;
}

.quick-terminal-snippet .cmd-text {
  color: #f1f5f9;
}

.quick-terminal-snippet .cmd-comment {
  color: #64748b;
  margin-left: 8px;
}

