/* ==========================================================================
   MaskCode AI - Enterprise Dark Theme & Cyberpunk AI Glassmorphic Stylesheet
   Domain: www.maskcode.qd.je
   Target: Cloudflare Pages Deployment
   ========================================================================== */

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

:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --bg-primary: #07090E;
  --bg-secondary: #0D111A;
  --bg-card: rgba(18, 24, 38, 0.7);
  --bg-card-hover: rgba(26, 34, 54, 0.85);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(99, 102, 241, 0.3);
  --border-glow: rgba(6, 182, 212, 0.4);
  
  --accent-cyan: #06B6D4;
  --accent-indigo: #6366F1;
  --accent-violet: #8B5CF6;
  --accent-coral: #E0694B; /* Anthropic signature warm coral */
  --accent-emerald: #10B981;
  --accent-amber: #F59E0B;
  --accent-rose: #F43F5E;
  
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  selection-background-color: var(--accent-indigo);
  selection-color: #ffffff;
}

::selection {
  background: rgba(99, 102, 241, 0.35);
  color: #ffffff;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Background Grid & Aurora Mesh */
.bg-grid-pattern {
  background-size: 40px 40px;
  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);
}

.aurora-bg {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1400px;
  height: 650px;
  pointer-events: none;
  background: radial-gradient(circle at 50% 10%, rgba(99, 102, 241, 0.15) 0%, rgba(6, 182, 212, 0.08) 40%, transparent 70%);
  z-index: 0;
}

.aurora-secondary {
  position: absolute;
  top: 40%;
  right: -10%;
  width: 600px;
  height: 600px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(224, 105, 75, 0.07) 0%, transparent 70%);
  z-index: 0;
}

/* Typography Gradient */
.gradient-text {
  background: linear-gradient(135deg, #FFFFFF 20%, #94A3B8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-cyan {
  background: linear-gradient(135deg, #38BDF8 0%, #06B6D4 50%, #6366F1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-anthropic {
  background: linear-gradient(135deg, #FDE68A 0%, #E0694B 60%, #C2410C 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Glassmorphic Cards */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.5), 0 0 20px -5px rgba(99, 102, 241, 0.15);
  transform: translateY(-2px);
}

.glass-card-interactive {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
}

/* Glowing Border Elements */
.glow-border {
  position: relative;
}
.glow-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.6), rgba(99, 102, 241, 0.4), transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Custom Code and Terminal Styles */
.font-mono-code {
  font-family: var(--font-mono);
}

.terminal-window {
  background: #0B0F19;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.terminal-header {
  background: #111726;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.code-badge-secret {
  background: rgba(244, 63, 94, 0.15);
  color: #FB7185;
  border: 1px solid rgba(244, 63, 94, 0.4);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  display: inline-block;
  animation: pulse-danger 2s infinite ease-in-out;
}

.code-badge-masked {
  background: rgba(6, 182, 212, 0.15);
  color: #22D3EE;
  border: 1px solid rgba(6, 182, 212, 0.4);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  display: inline-block;
}

.code-badge-rehydrated {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  display: inline-block;
}

@keyframes pulse-danger {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Claude Badge */
.claude-pill {
  background: linear-gradient(135deg, rgba(224, 105, 75, 0.15), rgba(194, 65, 12, 0.05));
  border: 1px solid rgba(224, 105, 75, 0.35);
  color: #FDBA74;
}

/* Modal styles */
.modal-overlay {
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Animated Pulse Dot */
.status-dot-active {
  width: 8px;
  height: 8px;
  background-color: #10B981;
  border-radius: 50%;
  position: relative;
  display: inline-block;
}
.status-dot-active::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  width: 12px;
  height: 12px;
  background-color: #10B981;
  border-radius: 50%;
  opacity: 0.7;
  animation: pulse-ring 1.8s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* Form styling */
input, textarea, select {
  font-family: inherit;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #6366F1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25) !important;
}

/* Documentation Layout Specifics */
.docs-sidebar {
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}

.docs-content h2 {
  scroll-margin-top: 100px;
}
.docs-content h3 {
  scroll-margin-top: 100px;
}
