@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --background: #09090b;
  --foreground: #fafafa;
  --card: #18181b;
  --card-foreground: #fafafa;
  --popover: #18181b;
  --popover-foreground: #fafafa;
  --primary: #fafafa;
  --primary-foreground: #18181b;
  --secondary: #27272a;
  --secondary-foreground: #fafafa;
  --muted: #27272a;
  --muted-foreground: #a1a1aa;
  --accent: #27272a;
  --accent-foreground: #fafafa;
  --destructive: #7f1d1d;
  --destructive-foreground: #fafafa;
  --border: #27272a;
  --input: #27272a;
  --ring: #d4d4d8;
  
  --emerald-accent: #10b981;
  --blue-accent: #3b82f6;
  --amber-accent: #f59e0b;
}

html.light {
  --background: #f8fafc;
  --foreground: #09090b;
  --card: #ffffff;
  --card-foreground: #09090b;
  --popover: #ffffff;
  --popover-foreground: #09090b;
  --primary: #18181b;
  --primary-foreground: #fafafa;
  --secondary: #f1f5f9;
  --secondary-foreground: #0f172a;
  --muted: #f1f5f9;
  --muted-foreground: #64748b;
  --accent: #f1f5f9;
  --accent-foreground: #0f172a;
  --border: #e2e8f0;
  --input: #e2e8f0;
}

html.light body {
  background-color: #f8fafc !important;
  color: #0f172a !important;
}

html.light .bg-zinc-950 {
  background-color: #f8fafc !important;
}

html.light .bg-zinc-950\/70,
html.light .bg-zinc-950\/80,
html.light .bg-zinc-950\/60,
html.light .bg-zinc-950\/40 {
  background-color: rgba(255, 255, 255, 0.85) !important;
}

html.light .bg-zinc-900,
html.light .bg-zinc-900\/60,
html.light .bg-zinc-900\/70,
html.light .bg-zinc-900\/80,
html.light .bg-zinc-900\/40,
html.light .bg-zinc-900\/30 {
  background-color: #ffffff !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05) !important;
}

html.light .bg-zinc-800,
html.light .bg-zinc-800\/70,
html.light .bg-zinc-800\/80,
html.light .bg-zinc-800\/60 {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
}

html.light .border-zinc-800,
html.light .border-zinc-800\/80,
html.light .border-zinc-800\/60,
html.light .border-zinc-700,
html.light .border-zinc-700\/50,
html.light .border-zinc-700\/60 {
  border-color: #e2e8f0 !important;
}

html.light .border-zinc-900 {
  border-color: #e2e8f0 !important;
}

html.light .text-white {
  color: #09090b !important;
}

html.light .hover\:text-white:hover {
  color: #09090b !important;
}

html.light .text-zinc-100,
html.light .text-zinc-200 {
  color: #09090b !important;
}

html.light .text-zinc-300 {
  color: #18181b !important;
}

html.light .text-zinc-400 {
  color: #52525b !important;
}

html.light .text-zinc-500 {
  color: #71717a !important;
}

html.light .text-zinc-600 {
  color: #94a3b8 !important;
}

html.light .text-slate-100,
html.light .text-slate-200 {
  color: #09090b !important;
}

html.light .text-slate-400 {
  color: #52525b !important;
}

html.light .hover\:bg-zinc-800:hover,
html.light .hover\:bg-zinc-900:hover,
html.light .hover\:bg-zinc-800\/60:hover {
  background-color: #f1f5f9 !important;
}

html.light .hover\:text-zinc-100:hover,
html.light .hover\:text-zinc-200:hover {
  color: #09090b !important;
}

html.light .text-gradient-zinc {
  background: linear-gradient(180deg, #09090b 0%, #475569 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

html.light .text-gradient-emerald {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Terminal & Code Blocks Protection in Light Mode */
html.light .mock-terminal,
html.light .mock-terminal pre,
html.light .terminal-window,
html.light .terminal-window pre,
html.light .docs-prose pre,
html.light pre#install-cmd-text {
  background-color: #09090b !important;
  color: #fafafa !important;
  border-color: #27272a !important;
}

html.light .mock-terminal .text-white,
html.light .terminal-window .text-white,
html.light pre .text-white {
  color: #ffffff !important;
}

html.light .mock-terminal .text-zinc-400,
html.light .terminal-window .text-zinc-400,
html.light pre .text-zinc-400 {
  color: #a1a1aa !important;
}

html.light .mock-terminal .text-zinc-300,
html.light .terminal-window .text-zinc-300,
html.light pre .text-zinc-300 {
  color: #d4d4d8 !important;
}

html.light .mock-terminal .text-zinc-500,
html.light .terminal-window .text-zinc-500,
html.light pre .text-zinc-500 {
  color: #71717a !important;
}

html.light .mock-terminal .bg-zinc-900,
html.light .mock-terminal .bg-zinc-900\/90,
html.light .terminal-window .bg-zinc-900,
html.light .terminal-window .bg-zinc-900\/90 {
  background-color: #18181b !important;
  border-color: #27272a !important;
}

/* Light Mode Grid & Dots */
html.light .bg-grid-zinc {
  background-image: 
    linear-gradient(to right, rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.04) 1px, transparent 1px) !important;
}

html.light .bg-dot-zinc {
  background-image: radial-gradient(rgba(0, 0, 0, 0.07) 1px, transparent 1px) !important;
}

/* Light Mode Inputs & Form Controls */
html.light input:not([type="password"].terminal-masked),
html.light select,
html.light textarea:not(#gen-key-output) {
  background-color: #ffffff !important;
  color: #09090b !important;
  border-color: #e2e8f0 !important;
}

html.light input::placeholder,
html.light textarea::placeholder {
  color: #94a3b8 !important;
}

html.light .shadcn-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05) !important;
}

html.light .shadcn-card:hover {
  border-color: #cbd5e1 !important;
}

/* Documentation Content Styling in Light Mode */
html.light .docs-prose {
  color: #334155 !important;
}

html.light .docs-prose h1,
html.light .docs-prose h2,
html.light .docs-prose h3 {
  color: #0f172a !important;
}

html.light .docs-prose code:not(pre code) {
  background: #f1f5f9 !important;
  color: #0284c7 !important;
  border: 1px solid #e2e8f0;
}

html.light .docs-callout {
  background: rgba(59, 130, 246, 0.05) !important;
}

html.light .docs-callout.tip {
  background: rgba(16, 185, 129, 0.05) !important;
}

html.light .docs-callout.warning {
  background: rgba(245, 158, 11, 0.05) !important;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

code, pre, .font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Background grid glow */
.bg-grid-zinc {
  background-size: 32px 32px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

.bg-dot-zinc {
  background-size: 24px 24px;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
}

/* shadcn Card */
.shadcn-card {
  background: rgba(24, 24, 27, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #27272a;
  border-radius: 0.75rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.shadcn-card:hover {
  border-color: #3f3f46;
}

/* Pulse indicator */
.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  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 6px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Gradients */
.text-gradient-zinc {
  background: linear-gradient(180deg, #ffffff 0%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-emerald {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-blue {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #09090b;
}
::-webkit-scrollbar-thumb {
  background: #27272a;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3f3f46;
}

/* Modern Toast Notification (Sonner-style) */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 420px;
  background: #18181b;
  border: 1px solid #27272a;
  color: #fafafa;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  animation: slideInToast 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-success {
  border-left: 3px solid #10b981;
}

.toast-error {
  border-left: 3px solid #ef4444;
}

.toast-info {
  border-left: 3px solid #3b82f6;
}

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

@keyframes fadeOutToast {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.95);
  }
}

/* Documentation Content Styling */
.docs-prose {
  color: #d4d4d8;
  font-size: 15px;
  line-height: 1.75;
}

.docs-prose h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #fafafa;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
}

.docs-prose h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fafafa;
  letter-spacing: -0.02em;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #27272a;
}

.docs-prose h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #f4f4f5;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.docs-prose p {
  margin-bottom: 1rem;
}

.docs-prose ul, .docs-prose ol {
  margin-bottom: 1rem;
  padding-left: 1.25rem;
}

.docs-prose li {
  margin-bottom: 0.35rem;
}

.docs-prose code:not(pre code) {
  background: #27272a;
  color: #38bdf8;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85em;
}

.docs-prose pre {
  background: #09090b !important;
  border: 1px solid #27272a;
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  line-height: 1.6;
}

.docs-callout {
  border-left: 4px solid #3b82f6;
  background: rgba(59, 130, 246, 0.08);
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 1rem;
  font-size: 14px;
}

.docs-callout.tip {
  border-left-color: #10b981;
  background: rgba(16, 185, 129, 0.08);
}

.docs-callout.warning {
  border-left-color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
}

/* Copy Button Feedback */
.btn-copy.copied {
  background-color: #10b981 !important;
  color: #ffffff !important;
}

/* Premium Segmented Language Switcher */
.lang-switcher-container {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border-radius: 8px;
  background-color: #18181b;
  border: 1px solid #27272a;
}

.lang-btn {
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid transparent;
  color: #a1a1aa;
  background: transparent;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.lang-btn:hover {
  color: #f4f4f5;
  background-color: rgba(39, 39, 42, 0.6);
}

.lang-btn.active {
  background-color: #27272a !important;
  color: #34d399 !important;
  border-color: rgba(63, 63, 70, 0.6) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Light Mode Navigation Elements */
html.light .lang-switcher-container {
  background-color: #f4f4f5 !important;
  border-color: #e4e4e7 !important;
}

html.light .lang-btn {
  color: #71717a !important;
}

html.light .lang-btn:hover {
  color: #09090b !important;
  background-color: #e4e4e7 !important;
}

html.light .lang-btn.active {
  background-color: #ffffff !important;
  color: #059669 !important;
  border-color: #e4e4e7 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

html.light .theme-toggle-btn {
  background-color: #ffffff !important;
  border-color: #e4e4e7 !important;
  color: #09090b !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

html.light .theme-toggle-btn:hover {
  background-color: #f4f4f5 !important;
  border-color: #d4d4d8 !important;
}

