/* HazartGo Ultra-Premium Developer Documentation Design System */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Fira+Code:wght@400;500;600&display=swap');

:root {
  --bg-dark: #030712;
  --bg-surface: #0b0f19;
  --bg-elevated: #111827;
  --bg-card: rgba(17, 24, 39, 0.7);
  --bg-card-hover: rgba(31, 41, 55, 0.85);
  --bg-code: #080c15;

  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;

  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --purple: #a855f7;
  --pink: #ec4899;
  --cyan: #06b6d4;
  --emerald: #10b981;
  --amber: #f59e0b;

  --grad-primary: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --grad-glow: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.18) 0%, rgba(168, 85, 247, 0.05) 50%, transparent 80%);

  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(99, 102, 241, 0.35);
  --border-focus: rgba(99, 102, 241, 0.5);

  --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-mono: 'Fira Code', monospace;

  --sidebar-w: 360px;
  --header-h: 64px;
}

[data-theme="light"] {
  --bg-dark: #f8fafc;
  --bg-surface: #ffffff;
  --bg-elevated: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-code: #0f172a;

  --text-main: #0f172a;
  --text-muted: #334155;
  --text-dim: #64748b;

  --border: #e2e8f0;
  --border-hover: #cbd5e1;
  --border-focus: rgba(99, 102, 241, 0.6);
  --grad-glow: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  background-image: var(--grad-glow);
  background-repeat: no-repeat;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Background Mesh Grid Accent */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

[data-theme="light"] body::before {
  background: radial-gradient(rgba(15, 23, 42, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
}

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

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Navbar Header */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: 100;
}

[data-theme="light"] .navbar {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.brand-badge {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.brand-version {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.15);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.3);
  font-family: var(--font-mono);
  font-weight: 600;
}

[data-theme="light"] .brand-version {
  background: rgba(168, 85, 247, 0.1);
  color: #7e22ce;
  border-color: rgba(168, 85, 247, 0.25);
}

.search-bar {
  flex: 1;
  max-width: 440px;
  margin: 0 30px;
  position: relative;
  cursor: pointer;
}

.search-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

[data-theme="light"] .search-box {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.search-box-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-box:hover {
  border-color: var(--border-focus);
  background: var(--bg-elevated);
}

.kbd-shortcut {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}

[data-theme="light"] .kbd-shortcut {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #64748b;
}

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

.icon-button {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

[data-theme="light"] .icon-button {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

.icon-button:hover {
  background: var(--bg-elevated);
  border-color: var(--border-focus);
  transform: translateY(-1px);
}

/* App Container */
.app-container {
  display: flex;
  margin-top: var(--header-h);
  position: relative;
  z-index: 1;
}

/* Sidebar Navigation */
.sidebar {
  width: var(--sidebar-w);
  position: fixed;
  top: var(--header-h);
  bottom: 0;
  left: 0;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  padding: 28px 18px;
  overflow-y: auto;
  z-index: 90;
}

[data-theme="light"] .sidebar {
  background: #ffffff;
  border-right-color: #e2e8f0;
}

.nav-section {
  margin-bottom: 28px;
}

.nav-header {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: 10px;
  padding-left: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.nav-link a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.15s ease;
  margin-bottom: 3px;
  position: relative;
}

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

[data-theme="light"] .nav-link a:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.nav-link a.active {
  color: #ffffff !important;
  background: var(--grad-primary) !important;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.nav-pill {
  margin-left: auto;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald);
  font-weight: 700;
}

[data-theme="light"] .nav-pill {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

/* Main Content Workspace */
.content-area {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 40px 56px 100px;
}

/* Hero Header */
.doc-hero {
  padding: 20px 0 50px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}

.pulse-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a855f7;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 24px;
}

[data-theme="light"] .pulse-badge {
  background: rgba(99, 102, 241, 0.08);
  color: #7e22ce;
  border-color: rgba(99, 102, 241, 0.25);
}

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

@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.hero-heading {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.18rem;
  color: var(--text-muted);
  max-width: 720px;
  margin-bottom: 36px;
  line-height: 1.7;
}

.cta-group {
  display: flex;
  gap: 16px;
}

.btn-gradient {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  background: var(--grad-primary);
  color: #ffffff;
  font-weight: 600;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 25px rgba(99, 102, 241, 0.35);
  border: none;
  cursor: pointer;
}

.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(168, 85, 247, 0.45);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-main);
  font-weight: 600;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
}

[data-theme="light"] .btn-outline {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

.btn-outline:hover {
  background: var(--bg-elevated);
  border-color: var(--border-focus);
}

/* Feature Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 22px;
  margin: 36px 0 56px;
}

.card-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

[data-theme="light"] .card-item {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.card-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad-primary);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.card-item:hover {
  border-color: var(--border-focus);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}

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

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-main);
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Documentation Content Sections */
.section-block {
  margin-bottom: 64px;
}

.section-title {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
}

.section-text {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.7;
}

/* IDE Code Block */
.code-window {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 24px 0 32px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .code-window {
  background: #0f172a;
  border-color: #334155;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
}

.code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.w-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.w-red {
  background: #ff5f56;
}

.w-yellow {
  background: #ffbd2e;
}

.w-green {
  background: #27c93f;
}

.btn-copy {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  font-size: 0.78rem;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-body);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-copy:hover {
  color: #ffffff;
  border-color: rgba(99, 102, 241, 0.6);
  background: rgba(99, 102, 241, 0.3);
}

pre {
  padding: 20px 22px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.7;
  color: #e5e7eb;
}

/* Syntax Token Colors */
.kwd {
  color: #f43f5e;
  font-weight: 600;
}

.typ {
  color: #38bdf8;
}

.str {
  color: #34d399;
}

.fn {
  color: #a78bfa;
  font-weight: 500;
}

.cmt {
  color: #6b7280;
  font-style: italic;
}

.num {
  color: #fbbf24;
}

/* Alert Callouts */
.callout-box {
  padding: 18px 22px;
  border-radius: 12px;
  margin: 24px 0;
  border-left: 4px solid;
  background: var(--bg-surface);
  font-size: 0.92rem;
  color: var(--text-main);
}

.callout-info {
  border-color: #0284c7;
  background: rgba(6, 182, 212, 0.08);
}

[data-theme="light"] .callout-info {
  background: #f0f9ff;
  border-color: #0284c7;
  color: #0c4a6e;
}

.callout-head {
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
}

/* Tables */
.doc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  background: var(--bg-surface);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

[data-theme="light"] .doc-table {
  background: #ffffff;
  border-color: #e2e8f0;
}

.doc-table th,
.doc-table td {
  padding: 14px 18px;
  text-align: left;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.doc-table th {
  background: var(--bg-elevated);
  color: var(--text-main);
  font-weight: 700;
}

[data-theme="light"] .doc-table th {
  background: #f8fafc;
  color: #0f172a;
}

.doc-table td code {
  font-family: var(--font-mono);
  background: var(--bg-code);
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 0.83rem;
  color: #a855f7;
  border: 1px solid var(--border);
}

[data-theme="light"] .doc-table td code {
  background: #f1f5f9;
  color: #6d28d9;
  border-color: #cbd5e1;
}

/* Interactive REST API Playground */
.tester-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  margin: 36px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .tester-box {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.tester-toolbar {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tester-select {
  flex: 1;
  min-width: 260px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 10px 16px;
  border-radius: 9px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
}

[data-theme="light"] .tester-select {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.tester-output {
  background: #080c15;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #34d399;
  min-height: 140px;
  white-space: pre-wrap;
}

[data-theme="light"] .tester-output {
  background: #0f172a;
  color: #34d399;
  border-color: #334155;
}

/* Command Palette Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  max-width: 620px;
  background: var(--bg-surface);
  border: 1px solid var(--border-focus);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

[data-theme="light"] .modal-card {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.modal-search-row {
  display: flex;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1.1rem;
  color: var(--text-main);
  margin-left: 14px;
  font-family: var(--font-body);
}

.modal-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 14px;
}

.result-card {
  display: block;
  padding: 14px 18px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-main);
  margin-bottom: 6px;
  transition: background 0.15s ease;
}

.result-card:hover {
  background: var(--bg-elevated);
}

[data-theme="light"] .result-card:hover {
  background: #f1f5f9;
}

.result-head {
  font-weight: 700;
  font-size: 0.95rem;
}

.result-sub {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Toast */
.toast-msg {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--grad-primary);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 6px 25px rgba(99, 102, 241, 0.4);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 300;
}

.toast-msg.show {
  transform: translateY(0);
  opacity: 1;
}

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

  .content-area {
    margin-left: 0;
    padding: 30px 24px;
  }

  .search-bar {
    display: none;
  }
}