/* ==========================================================================
   TaleAPI Docs - "简洁大气舒服" Premium Design System
   ========================================================================== */

:root, .dark, html.dark, html {
  --vp-c-brand-1: #6366f1 !important;
  --vp-c-brand-2: #818cf8 !important;
  --vp-c-brand-3: #4f46e5 !important;
  --vp-c-brand-soft: rgba(99, 102, 241, 0.14) !important;

  --vp-c-indigo-1: #818cf8 !important;
  --vp-c-indigo-2: #6366f1 !important;
  --vp-c-indigo-3: #4f46e5 !important;
  --vp-c-indigo-soft: rgba(99, 102, 241, 0.14) !important;

  /* High-end obsidian / deep slate */
  --vp-c-bg: #0b0f19 !important;
  --vp-c-bg-alt: #0e1424 !important;
  --vp-c-bg-elv: #131b2e !important;
  --vp-c-bg-soft: #111827 !important;

  /* Translucent hairline borders */
  --vp-c-border: rgba(255, 255, 255, 0.08) !important;
  --vp-c-divider: rgba(255, 255, 255, 0.06) !important;
  --vp-c-gutter: #080c14 !important;

  /* Text hierarchy */
  --vp-c-text-1: #f1f5f9 !important;
  --vp-c-text-2: #94a3b8 !important;
  --vp-c-text-3: #64748b !important;

  /* Nav & Sidebar */
  --vp-nav-bg-color: rgba(11, 15, 25, 0.82) !important;
  --vp-sidebar-bg-color: rgba(11, 15, 25, 0.88) !important;

  /* Code block */
  --vp-code-block-bg: #0c101d !important;
  --vp-code-bg: rgba(99, 102, 241, 0.1) !important;
  --vp-code-line-height: 1.75 !important;
  --vp-code-copy-code-bg: rgba(255, 255, 255, 0.06) !important;
  --vp-code-copy-code-hover-bg: rgba(255, 255, 255, 0.12) !important;
  --vp-code-copy-code-border: rgba(255, 255, 255, 0.08) !important;

  --vp-home-hero-name-background: linear-gradient(135deg, #c7d2fe 0%, #818cf8 50%, #38bdf8 100%) !important;
  --vp-home-hero-name-color: transparent !important;

  --vp-font-family-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif !important;
  --vp-font-family-mono: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
}

html, body {
  background-color: #0b0f19 !important;
  color: #cbd5e1 !important;
  font-family: var(--vp-font-family-base) !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

body {
  background-image: 
    radial-gradient(ellipse 90% 450px at 50% -50px, rgba(99, 102, 241, 0.14), transparent 75%),
    radial-gradient(ellipse 50% 300px at 85% 180px, rgba(56, 189, 248, 0.06), transparent 60%) !important;
  background-attachment: fixed !important;
}

.VPNav {
  background: rgba(11, 15, 25, 0.82) !important;
  backdrop-filter: blur(16px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.VPNavBar {
  background: transparent !important;
}

.VPNavBarTitle .title {
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  color: #f8fafc !important;
}

.VPNavBarMenuLink {
  color: #94a3b8 !important;
  font-weight: 500 !important;
  font-size: 14px !important;
  padding: 0 14px !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.VPNavBarMenuLink:hover {
  color: #f1f5f9 !important;
}

.VPNavBarMenuLink.active {
  color: #818cf8 !important;
  font-weight: 600 !important;
}

/* Prominent, sleek TaleNai Nav Button */
.talenai-nav-link,
a.talenai-nav-link {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 5px 15px !important;
  margin-left: 10px !important;
  border-radius: 9999px !important;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.18) 0%, rgba(56, 189, 248, 0.14) 100%) !important;
  border: 1px solid rgba(99, 102, 241, 0.35) !important;
  color: #c7d2fe !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.12) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  text-decoration: none !important;
}

.talenai-nav-link:hover,
a.talenai-nav-link:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.32) 0%, rgba(56, 189, 248, 0.26) 100%) !important;
  border-color: rgba(99, 102, 241, 0.65) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 18px rgba(99, 102, 241, 0.3) !important;
  transform: translateY(-1px) !important;
}

/* Sidebar */
.VPSidebar {
  background: rgba(11, 15, 25, 0.88) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.07) !important;
}

.VPSidebarItem.level-0 > .item > .text {
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  color: #64748b !important;
  padding: 10px 0 6px 0 !important;
}

.VPSidebarItem.level-1 > .item .text,
.VPSidebarItem.level-2 > .item .text {
  color: #94a3b8 !important;
  font-size: 13.5px !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.VPSidebarItem.is-active > .item .text {
  color: #818cf8 !important;
  font-weight: 600 !important;
}

.VPSidebarItem.is-active > .item {
  background: rgba(99, 102, 241, 0.1) !important;
  border-radius: 8px !important;
  border-left: 2px solid #6366f1 !important;
}

/* Home Hero Section */
.VPHomeHero .name {
  font-size: 48px !important;
  line-height: 1.15 !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
}

.VPHomeHero .text {
  font-size: 40px !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
  color: #f8fafc !important;
  letter-spacing: -0.02em !important;
}

.VPHomeHero .tagline {
  color: #94a3b8 !important;
  font-size: 18px !important;
  line-height: 1.6 !important;
  margin-top: 14px !important;
}

.VPButton.brand {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35) !important;
  border-radius: 10px !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.VPButton.brand:hover {
  background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%) !important;
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.5) !important;
  transform: translateY(-1px) !important;
}

.VPButton.alt {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #f1f5f9 !important;
  font-weight: 500 !important;
  border-radius: 10px !important;
  backdrop-filter: blur(8px) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.VPButton.alt:hover {
  background: rgba(255, 255, 255, 0.09) !important;
  border-color: rgba(99, 102, 241, 0.4) !important;
  transform: translateY(-1px) !important;
}

/* Home Feature Cards (Clean Bento Grid) */
.VPFeatures .box {
  background: linear-gradient(180deg, rgba(20, 27, 45, 0.72) 0%, rgba(12, 17, 30, 0.85) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  border-radius: 16px !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.22) !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  padding: 28px !important;
  height: 100% !important;
}

.VPFeatures .box:hover {
  border-color: rgba(99, 102, 241, 0.45) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), 0 0 24px rgba(99, 102, 241, 0.15) !important;
  transform: translateY(-3px) !important;
}

.VPFeatures .title {
  color: #f1f5f9 !important;
  font-size: 19px !important;
  font-weight: 600 !important;
  margin-bottom: 10px !important;
  letter-spacing: -0.01em !important;
}

.VPFeatures .details {
  color: #94a3b8 !important;
  font-size: 14px !important;
  line-height: 1.65 !important;
}

/* Documentation Content Typography & Hierarchy */
.vp-doc {
  line-height: 1.8 !important;
  color: #cbd5e1 !important;
}

.vp-doc h1 {
  color: #f8fafc !important;
  font-weight: 700 !important;
  letter-spacing: -0.025em !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding-bottom: 14px !important;
  margin-bottom: 24px !important;
}

.vp-doc h2 {
  color: #f1f5f9 !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  padding-bottom: 10px !important;
  margin-top: 38px !important;
  margin-bottom: 18px !important;
}

.vp-doc h3 {
  color: #e2e8f0 !important;
  font-weight: 600 !important;
  letter-spacing: -0.015em !important;
  margin-top: 28px !important;
  margin-bottom: 14px !important;
}

.vp-doc p, .vp-doc li {
  line-height: 1.8 !important;
  color: #cbd5e1 !important;
}

.vp-doc strong {
  color: #f1f5f9 !important;
  font-weight: 600 !important;
}

.vp-doc a {
  color: #818cf8 !important;
  text-decoration: none !important;
  border-bottom: 1px solid rgba(129, 140, 248, 0.3) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.vp-doc a:hover {
  color: #a5b4fc !important;
  border-bottom-color: #a5b4fc !important;
}

.vp-doc a.header-anchor {
  border-bottom: none !important;
  color: #64748b !important;
}

.vp-doc hr {
  border-color: rgba(255, 255, 255, 0.07) !important;
  margin: 32px 0 !important;
}

/* Code Blocks - macOS Terminal Window Style */
.vp-doc div[class*='language-'] {
  position: relative !important;
  background-color: #0c101d !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.45) !important;
  overflow: hidden !important;
  padding-top: 36px !important;
  margin: 22px 0 !important;
}

/* Terminal Header faux bar */
.vp-doc div[class*='language-']::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 36px !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  pointer-events: none !important;
  z-index: 1 !important;
}

/* macOS 3 dots */
.vp-doc div[class*='language-']::after {
  content: '' !important;
  position: absolute !important;
  top: 13px !important;
  left: 14px !important;
  width: 10px !important;
  height: 10px !important;
  border-radius: 50% !important;
  background: #ef4444 !important;
  box-shadow: 16px 0 0 #f59e0b, 32px 0 0 #10b981 !important;
  opacity: 0.75 !important;
  z-index: 2 !important;
}

.vp-doc [class*='language-'] pre {
  padding: 16px 20px !important;
  margin: 0 !important;
  background: transparent !important;
}

.vp-doc [class*='language-'] code {
  font-family: var(--vp-font-family-mono) !important;
  font-size: 13.5px !important;
  line-height: 1.7 !important;
}

.vp-doc [class*='language-'] > span.lang {
  top: 9px !important;
  right: 48px !important;
  font-family: var(--vp-font-family-mono) !important;
  font-size: 11px !important;
  color: #64748b !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  z-index: 2 !important;
}

.vp-doc [class*='language-'] > button.copy {
  top: 6px !important;
  right: 8px !important;
  z-index: 3 !important;
  border-radius: 6px !important;
}

/* Disable macOS header when inside tabs */
.vp-code-group div[class*='language-'] {
  padding-top: 0 !important;
  border-top: none !important;
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
}
.vp-code-group div[class*='language-']::before,
.vp-code-group div[class*='language-']::after {
  display: none !important;
}

/* Inline Code Pill */
.vp-doc :not(pre) > code {
  border-radius: 6px !important;
  padding: 2px 7px !important;
  background-color: rgba(99, 102, 241, 0.12) !important;
  border: 1px solid rgba(99, 102, 241, 0.22) !important;
  color: #a5b4fc !important;
  font-family: var(--vp-font-family-mono) !important;
  font-size: 0.88em !important;
  font-weight: 500 !important;
}

/* Tables - Modern & Spacious */
.vp-doc table {
  display: table !important;
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border-radius: 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(15, 23, 42, 0.45) !important;
  overflow: hidden !important;
  margin: 24px 0 !important;
}

.vp-doc th {
  background: rgba(30, 41, 59, 0.65) !important;
  color: #f1f5f9 !important;
  font-weight: 600 !important;
  padding: 12px 18px !important;
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  text-align: left !important;
}

.vp-doc td {
  padding: 12px 18px !important;
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  color: #cbd5e1 !important;
}

.vp-doc tr:last-child td {
  border-bottom: none !important;
}

.vp-doc tr:hover td {
  background-color: rgba(99, 102, 241, 0.05) !important;
}

/* Callout Boxes / Custom Blocks */
.vp-doc .custom-block {
  border-radius: 10px !important;
  padding: 16px 20px !important;
  margin: 22px 0 !important;
}

.vp-doc .custom-block.tip {
  background: rgba(16, 185, 129, 0.08) !important;
  border-left: 3px solid #10b981 !important;
}

.vp-doc .custom-block.info {
  background: rgba(56, 189, 248, 0.08) !important;
  border-left: 3px solid #38bdf8 !important;
}

.vp-doc .custom-block.warning {
  background: rgba(245, 158, 11, 0.08) !important;
  border-left: 3px solid #f59e0b !important;
}

.vp-doc .custom-block.danger {
  background: rgba(239, 68, 68, 0.08) !important;
  border-left: 3px solid #ef4444 !important;
}

/* Minimal Scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.2);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.38);
}
