/* Magen Cybersecurity - Modern Cyber Defense Suite Theme & CSS Logo */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300;0,400;0,500;0,700;1,400&family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&display=swap');

:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --color-magen-cyan: #06b6d4;
  --color-magen-sky: #38bdf8;
  --color-magen-blue: #3b82f6;
  --color-magen-indigo: #6366f1;
  --color-magen-amber: #fbbf24;
  --color-magen-emerald: #10b981;
}

body {
  font-family: var(--font-sans);
  background-color: #070a11;
  color: #f1f5f9;
}

.font-mono {
  font-family: var(--font-mono);
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #070a13;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.2);
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
  border-color: rgba(56, 189, 248, 0.45);
}

/* ==========================================================================
   HONEYCOMB GEOMETRIC BACKGROUND & GRADIENTS
   ========================================================================== */

/* High-Tech Honeycomb Pattern with Multi-Layered Radial Spotlights & Shadows */
.bg-honeycomb-pattern {
  background-color: #05070f;
  background-image:
    /* Layer 1: Ambient Top Spotlight (Cyan / Electric Sky) */
    radial-gradient(ellipse 90% 55% at 50% -10%, rgba(6, 182, 212, 0.22) 0%, rgba(56, 189, 248, 0.08) 35%, transparent 70%),
    /* Layer 2: Mid-Left Subtle Indigo / Purple Glow */
    radial-gradient(ellipse 65% 45% at 8% 40%, rgba(99, 102, 241, 0.14) 0%, transparent 60%),
    /* Layer 3: Mid-Right Cyber Cyan Core */
    radial-gradient(ellipse 65% 45% at 92% 65%, rgba(6, 182, 212, 0.13) 0%, transparent 60%),
    /* Layer 4: Bottom Deep Obsidian Shadow */
    radial-gradient(ellipse 90% 60% at 50% 115%, rgba(15, 23, 42, 0.85) 0%, transparent 75%),
    /* Layer 5: Seamless Crisp Honeycomb Hexagon Mesh */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='96' viewBox='0 0 56 96'%3E%3Cpath d='M28 0 L56 16 L56 48 L28 64 L0 48 L0 16 Z M28 64 L28 96 M0 48 L0 80 L28 96 L56 80 L56 48' fill='none' stroke='%2338bdf8' stroke-width='1.1' stroke-opacity='0.085'/%3E%3Cpath d='M28 8 L48 19.5 L48 44.5 L28 56 L8 44.5 L8 19.5 Z' fill='%2306b6d4' fill-opacity='0.015' stroke='%2306b6d4' stroke-width='0.6' stroke-opacity='0.04'/%3E%3Ccircle cx='28' cy='0' r='1.5' fill='%2338bdf8' fill-opacity='0.35'/%3E%3Ccircle cx='56' cy='16' r='1.5' fill='%2338bdf8' fill-opacity='0.25'/%3E%3Ccircle cx='0' cy='16' r='1.5' fill='%2338bdf8' fill-opacity='0.25'/%3E%3Ccircle cx='28' cy='64' r='1.5' fill='%2338bdf8' fill-opacity='0.35'/%3E%3C/svg%3E"),
    /* Layer 6: Deep Linear Depth Gradient */
    linear-gradient(180deg, #05070e 0%, #080d1a 45%, #05070e 100%);
  background-attachment: fixed;
  background-size: auto, auto, auto, auto, 56px 96px, auto;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, repeat, no-repeat;
}

/* Backward compatibility for any lingering grid references */
.bg-grid-pattern {
  background-color: #05070f;
  background-image:
    radial-gradient(ellipse 90% 55% at 50% -10%, rgba(6, 182, 212, 0.22) 0%, rgba(56, 189, 248, 0.08) 35%, transparent 70%),
    radial-gradient(ellipse 65% 45% at 8% 40%, rgba(99, 102, 241, 0.14) 0%, transparent 60%),
    radial-gradient(ellipse 65% 45% at 92% 65%, rgba(6, 182, 212, 0.13) 0%, transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='96' viewBox='0 0 56 96'%3E%3Cpath d='M28 0 L56 16 L56 48 L28 64 L0 48 L0 16 Z M28 64 L28 96 M0 48 L0 80 L28 96 L56 80 L56 48' fill='none' stroke='%2338bdf8' stroke-width='1.1' stroke-opacity='0.085'/%3E%3Cpath d='M28 8 L48 19.5 L48 44.5 L28 56 L8 44.5 L8 19.5 Z' fill='%2306b6d4' fill-opacity='0.015' stroke='%2306b6d4' stroke-width='0.6' stroke-opacity='0.04'/%3E%3Ccircle cx='28' cy='0' r='1.5' fill='%2338bdf8' fill-opacity='0.35'/%3E%3Ccircle cx='56' cy='16' r='1.5' fill='%2338bdf8' fill-opacity='0.25'/%3E%3Ccircle cx='0' cy='16' r='1.5' fill='%2338bdf8' fill-opacity='0.25'/%3E%3Ccircle cx='28' cy='64' r='1.5' fill='%2338bdf8' fill-opacity='0.35'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #05070e 0%, #080d1a 45%, #05070e 100%);
  background-attachment: fixed;
  background-size: auto, auto, auto, 56px 96px, auto;
}

/* Honeycomb Vignette Edge Shadows */
.honeycomb-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle at 50% 50%, transparent 65%, rgba(3, 5, 10, 0.65) 100%);
  box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.85);
}

/* ==========================================================================
   ELEVATED CARDS & SHADOWING SYSTEM
   ========================================================================== */

/* Magen Glowing effects */
.glow-magen {
  box-shadow: 0 0 30px -4px rgba(56, 189, 248, 0.45), 0 0 12px -2px rgba(6, 182, 212, 0.35);
}

.glow-flame {
  box-shadow: 0 0 30px -5px rgba(249, 115, 22, 0.45), 0 0 12px -2px rgba(239, 68, 68, 0.35);
}

.glow-amber {
  box-shadow: 0 0 25px -5px rgba(251, 191, 36, 0.45);
}

.glow-cyan {
  box-shadow: 0 0 25px -5px rgba(6, 182, 212, 0.5);
}

.glow-emerald {
  box-shadow: 0 0 25px -5px rgba(16, 185, 129, 0.4);
}

/* Glassmorphic panels with deep shadows */
.glass-panel {
  background: linear-gradient(145deg, rgba(13, 18, 30, 0.88) 0%, rgba(9, 13, 24, 0.92) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(56, 189, 248, 0.16);
  box-shadow: 
    0 15px 35px -5px rgba(0, 0, 0, 0.75),
    0 5px 15px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0 25px rgba(6, 182, 212, 0.02);
}

.glass-panel-magen {
  background: linear-gradient(135deg, rgba(14, 23, 42, 0.90) 0%, rgba(8, 14, 28, 0.95) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(56, 189, 248, 0.30);
  box-shadow: 
    0 20px 45px -10px rgba(0, 0, 0, 0.85),
    0 0 25px -5px rgba(6, 182, 212, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.glass-card {
  background: linear-gradient(145deg, rgba(20, 27, 44, 0.75) 0%, rgba(12, 17, 30, 0.85) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(56, 189, 248, 0.14);
  box-shadow: 
    0 10px 25px -5px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

/* Tool Cards on the Hub - Elevated Hover State with Honeycomb Reflection */
.tool-card {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.85) 0%, rgba(10, 15, 28, 0.92) 100%) !important;
  border: 1px solid rgba(56, 189, 248, 0.15) !important;
  box-shadow: 
    0 12px 30px -8px rgba(0, 0, 0, 0.75),
    0 4px 6px -2px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0 20px rgba(6, 182, 212, 0.02) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
}

.tool-card:hover {
  transform: translateY(-4px) scale(1.01) !important;
  border-color: rgba(56, 189, 248, 0.5) !important;
  box-shadow: 
    0 22px 45px -10px rgba(0, 0, 0, 0.88),
    0 0 30px -4px rgba(6, 182, 212, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 0 30px rgba(6, 182, 212, 0.06) !important;
}

/* ==========================================================================
   PURE CSS MAGEN LOGO SYSTEM (Navbar & Hero)
   ========================================================================== */

/* 1. Navbar Compact CSS Magen Shield Logo */
.magen-logo-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 48px;
  filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.45)) drop-shadow(0 0 20px rgba(99, 102, 241, 0.25));
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.group:hover .magen-logo-badge {
  transform: scale(1.08) translateY(-1px);
  filter: drop-shadow(0 0 18px rgba(56, 189, 248, 0.8)) drop-shadow(0 0 30px rgba(99, 102, 241, 0.5));
}

.magen-shield-outer {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 2.2px;
  background: linear-gradient(135deg, #e0f2fe 0%, #38bdf8 25%, #6366f1 60%, #06b6d4 85%, #ffffff 100%);
  clip-path: polygon(50% 0%, 100% 22%, 100% 74%, 50% 100%, 0% 74%, 0% 22%);
  transition: all 0.3s ease;
}

.magen-shield-inner {
  position: relative;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 50% 20%, #172554 0%, #0b1329 50%, #030712 100%);
  clip-path: polygon(50% 0%, 100% 22%, 100% 74%, 50% 100%, 0% 74%, 0% 22%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* High-tech shield grid texture */
.magen-shield-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(56, 189, 248, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.18) 1px, transparent 1px);
  background-size: 5px 5px;
  opacity: 0.75;
  pointer-events: none;
}

/* 3D Faceted shield bevel */
.magen-shield-facet-l {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.02) 100%);
  pointer-events: none;
}

.magen-shield-facet-r {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(270deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.05) 100%);
  pointer-events: none;
}

/* Glossy glass reflection on upper crest */
.magen-shield-glass {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 55%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.08) 55%, transparent 100%);
  clip-path: polygon(50% 0%, 100% 35%, 85% 90%, 50% 75%, 15% 90%, 0% 35%);
  pointer-events: none;
  z-index: 2;
}

/* Specular Sheen Beam & Animation */
.magen-shield-sheen {
  position: absolute;
  top: -60%;
  left: -60%;
  width: 220%;
  height: 220%;
  background: linear-gradient(
    115deg,
    transparent 0%,
    transparent 35%,
    rgba(255, 255, 255, 0.08) 42%,
    rgba(255, 255, 255, 0.85) 50%,
    rgba(56, 189, 248, 0.7) 56%,
    transparent 65%,
    transparent 100%
  );
  animation: shieldSheenSweep 3.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  pointer-events: none;
  z-index: 4;
  mix-blend-mode: screen;
}

@keyframes shieldSheenSweep {
  0% {
    transform: translate3d(-100%, -100%, 0) rotate(15deg);
    opacity: 0;
  }
  8% {
    opacity: 1;
  }
  36% {
    transform: translate3d(100%, 100%, 0) rotate(15deg);
    opacity: 1;
  }
  42%, 100% {
    transform: translate3d(100%, 100%, 0) rotate(15deg);
    opacity: 0;
  }
}

.group:hover .magen-shield-sheen {
  animation: shieldSheenSweepHover 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@keyframes shieldSheenSweepHover {
  0% {
    transform: translate3d(-100%, -100%, 0) rotate(15deg);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  60% {
    transform: translate3d(100%, 100%, 0) rotate(15deg);
    opacity: 1;
  }
  70%, 100% {
    transform: translate3d(100%, 100%, 0) rotate(15deg);
    opacity: 0;
  }
}

/* High-tech scanning laser */
@keyframes shieldScanAnim {
  0% { transform: translateY(-120%); opacity: 0; }
  15% { opacity: 0.9; }
  85% { opacity: 0.9; }
  100% { transform: translateY(220%); opacity: 0; }
}

.magen-shield-scanner {
  position: absolute;
  left: -20%;
  right: -20%;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(56, 189, 248, 0.95) 50%, transparent 100%);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.9);
  animation: shieldScanAnim 2.8s infinite ease-in-out;
  pointer-events: none;
  z-index: 3;
}

/* Stylized CSS Magen Glyph (Cyber "M" and Dual Defense Chevron) */
.magen-shield-glyph {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.magen-glyph-char {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.05em;
  background: linear-gradient(180deg, #ffffff 0%, #7dd3fc 45%, #0284c7 85%, #0369a1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.85));
  user-select: none;
  line-height: 1;
}

/* Glowing central reactor core dot */
.magen-shield-core {
  position: absolute;
  bottom: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 6px #38bdf8, 0 0 12px rgba(6, 182, 212, 0.9);
  animation: shieldPulse 2s infinite ease-in-out;
  z-index: 6;
}

@keyframes shieldPulse {
  0%, 100% { transform: scale(1); opacity: 0.85; box-shadow: 0 0 6px #38bdf8, 0 0 10px rgba(6, 182, 212, 0.8); }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 10px #38bdf8, 0 0 18px rgba(99, 102, 241, 0.9); }
}

/* 2. Hero Centerpiece Large CSS Magen Defense Matrix */
.magen-hero-matrix {
  position: relative;
  width: 280px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 640px) {
  .magen-hero-matrix {
    width: 380px;
    height: 180px;
  }
}

/* Radar & Defense Rings */
.magen-radar-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(56, 189, 248, 0.25);
  pointer-events: none;
}

.magen-radar-ring-1 {
  width: 140px;
  height: 140px;
  animation: ringRotate 20s linear infinite;
}

.magen-radar-ring-2 {
  width: 220px;
  height: 220px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  animation: ringRotate 30s linear infinite reverse;
}

.magen-radar-sweep {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, transparent 270deg, rgba(56, 189, 248, 0.18) 360deg);
  animation: ringRotate 4s linear infinite;
  pointer-events: none;
}

@keyframes ringRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Large Hero Centerpiece Shield */
.magen-hero-shield-outer {
  position: relative;
  z-index: 10;
  width: 100px;
  height: 114px;
  padding: 3.5px;
  background: linear-gradient(135deg, #e0f2fe 0%, #38bdf8 25%, #6366f1 60%, #06b6d4 85%, #ffffff 100%);
  clip-path: polygon(50% 0%, 100% 22%, 100% 74%, 50% 100%, 0% 74%, 0% 22%);
  filter: drop-shadow(0 0 25px rgba(56, 189, 248, 0.6)) drop-shadow(0 0 45px rgba(99, 102, 241, 0.4));
  animation: heroShieldFloat 4s ease-in-out infinite;
  transition: all 0.3s ease;
}

@keyframes heroShieldFloat {
  0%, 100% { transform: translateY(0px) scale(1); filter: drop-shadow(0 0 25px rgba(56, 189, 248, 0.6)) drop-shadow(0 0 40px rgba(99, 102, 241, 0.4)); }
  50% { transform: translateY(-5px) scale(1.02); filter: drop-shadow(0 0 35px rgba(56, 189, 248, 0.8)) drop-shadow(0 0 55px rgba(6, 182, 212, 0.55)); }
}

.magen-hero-shield-inner {
  position: relative;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 50% 20%, #172554 0%, #0b1329 50%, #030712 100%);
  clip-path: polygon(50% 0%, 100% 22%, 100% 74%, 50% 100%, 0% 74%, 0% 22%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.magen-hero-glyph {
  font-family: var(--font-mono);
  font-size: 46px;
  font-weight: 900;
  letter-spacing: -0.05em;
  background: linear-gradient(180deg, #ffffff 0%, #7dd3fc 45%, #0284c7 85%, #0369a1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 14px rgba(56, 189, 248, 0.9));
  user-select: none;
  line-height: 1;
}

.magen-hero-core {
  position: absolute;
  bottom: 16px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 10px #38bdf8, 0 0 20px rgba(56, 189, 248, 1), 0 0 30px rgba(99, 102, 241, 0.8);
  animation: shieldPulse 1.8s infinite ease-in-out;
  z-index: 6;
}

/* Orbiting Defense Nodes */
.magen-orbit-node {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
}

.node-top-left {
  top: 15%;
  left: 20%;
  animation: nodePulse 2.5s infinite ease-in-out;
}

.node-bottom-right {
  bottom: 15%;
  right: 20%;
  background: #6366f1;
  box-shadow: 0 0 8px #6366f1;
  animation: nodePulse 2.5s infinite ease-in-out 1.25s;
}

@keyframes nodePulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.4); opacity: 1; box-shadow: 0 0 14px #38bdf8; }
}

/* Pulse indicator animation */
@keyframes flamePulse {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7); }
  50% { opacity: 0.6; transform: scale(1.1); box-shadow: 0 0 8px 3px rgba(6, 182, 212, 0.4); }
}

.live-flame-pulse {
  animation: flamePulse 2s infinite ease-in-out;
}

/* Drag overlay */
.drag-active {
  border-color: #38bdf8 !important;
  background-color: rgba(56, 189, 248, 0.08) !important;
}

/* Gradient border utilities */
.border-magen-gradient {
  border-image: linear-gradient(to right, rgba(56, 189, 248, 0.7), rgba(99, 102, 241, 0.4), rgba(6, 182, 212, 0.7)) 1;
}

/* ==========================================================================
   POP-IN TOOLS MENU DRAWER & ACTIVE STATES
   ========================================================================== */
#tools-popin-menu.menu-open {
  transform: translateX(0) !important;
  pointer-events: auto !important;
  box-shadow: -10px 0 35px -5px rgba(6, 182, 212, 0.25), -20px 0 50px -10px rgba(0, 0, 0, 0.8) !important;
}

#tools-popin-overlay.overlay-open {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.menu-tool-item {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-tool-item:hover {
  transform: translateX(3px);
}

.menu-tool-item.active-tool {
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.14) 0%, rgba(14, 23, 42, 0.85) 100%) !important;
  border-color: rgba(6, 182, 212, 0.5) !important;
  box-shadow: 0 0 15px -3px rgba(6, 182, 212, 0.25);
}

.menu-tool-item.active-tool .active-badge {
  display: inline-flex !important;
}

/* ==========================================================================
   MODAL ENTRANCE ANIMATION
   ========================================================================== */
@keyframes modalFadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-animate {
  animation: modalFadeInScale 0.2s ease-out;
}

/* ==========================================================================
   DOCUMENT TREE & GLFM BLOG STYLES
   ========================================================================== */

/* Tree Sidebar & Hierarchy */
.tree-node-folder > .tree-folder-header {
  transition: background-color 0.15s ease, color 0.15s ease;
}

.tree-node-folder.open > .tree-folder-header .tree-chevron {
  transform: rotate(90deg);
}

.tree-chevron {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.tree-children {
  position: relative;
  margin-left: 0.75rem;
  padding-left: 0.5rem;
  border-left: 1px solid rgba(51, 65, 85, 0.4);
}

.tree-item-doc {
  transition: all 0.15s ease;
}

.tree-item-doc:hover {
  background: rgba(30, 41, 59, 0.6);
  color: #f1f5f9;
}

.tree-item-doc.active-post {
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.18) 0%, rgba(99, 102, 241, 0.08) 100%) !important;
  border-color: rgba(56, 189, 248, 0.45) !important;
  color: #ffffff !important;
  box-shadow: 0 0 15px -3px rgba(56, 189, 248, 0.2);
  font-weight: 600;
}

.tree-item-doc.active-post .tree-doc-icon {
  color: #38bdf8 !important;
}

/* GLFM Typography & Elements */
.glfm-content h1,
.glfm-content h2,
.glfm-content h3,
.glfm-content h4,
.glfm-content h5,
.glfm-content h6 {
  color: #f8fafc;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  position: relative;
}

.glfm-content h1 { font-size: 1.875rem; line-height: 2.25rem; border-bottom: 1px solid rgba(51, 65, 85, 0.5); padding-bottom: 0.5rem; }
.glfm-content h2 { font-size: 1.5rem; line-height: 2rem; border-bottom: 1px solid rgba(51, 65, 85, 0.3); padding-bottom: 0.4rem; }
.glfm-content h3 { font-size: 1.25rem; line-height: 1.75rem; }
.glfm-content h4 { font-size: 1.1rem; line-height: 1.5rem; }

.glfm-content p {
  margin-bottom: 1.25rem;
  line-height: 1.75;
  color: #cbd5e1;
}

.glfm-content a {
  color: #38bdf8;
  text-decoration: none;
  border-bottom: 1px dashed rgba(56, 189, 248, 0.5);
  transition: all 0.15s ease;
}

.glfm-content a:hover {
  color: #7dd3fc;
  border-bottom-style: solid;
}

.glfm-content hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.3), rgba(99, 102, 241, 0.3), transparent);
  margin: 2rem 0;
}

.glfm-content strong {
  color: #f1f5f9;
  font-weight: 600;
}

.glfm-content code:not(pre code) {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85em;
  padding: 0.15em 0.4em;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 0.375rem;
  color: #38bdf8;
}

/* GLFM Code Blocks with Header Bar */
.glfm-code-block {
  margin: 1.5rem 0;
  border-radius: 0.875rem;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.8);
  background: #090d18;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

.glfm-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(51, 65, 85, 0.6);
  font-size: 0.75rem;
  font-family: ui-monospace, SFMono-Regular, monospace;
  color: #94a3b8;
}

.glfm-copy-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(51, 65, 85, 0.8);
  color: #cbd5e1;
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.glfm-copy-btn:hover {
  background: rgba(51, 65, 85, 1);
  color: #ffffff;
  border-color: rgba(56, 189, 248, 0.4);
}

.glfm-code-block pre {
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.5;
  background: transparent !important;
}

/* GLFM Alert / Callout Boxes */
.glfm-alert {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-radius: 0.875rem;
  border-left: 4px solid;
  background: rgba(15, 23, 42, 0.7);
  box-shadow: 0 4px 15px -2px rgba(0, 0, 0, 0.3);
}

.glfm-alert-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, monospace;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.glfm-alert-content {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #cbd5e1;
}

.glfm-alert-content p:last-child {
  margin-bottom: 0;
}

/* Alert Themes */
.glfm-alert-note {
  border-left-color: #38bdf8;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.08) 0%, rgba(15, 23, 42, 0.6) 100%);
}
.glfm-alert-note .glfm-alert-header { color: #38bdf8; }

.glfm-alert-tip {
  border-left-color: #34d399;
  background: linear-gradient(90deg, rgba(52, 211, 153, 0.08) 0%, rgba(15, 23, 42, 0.6) 100%);
}
.glfm-alert-tip .glfm-alert-header { color: #34d399; }

.glfm-alert-important {
  border-left-color: #a78bfa;
  background: linear-gradient(90deg, rgba(167, 139, 250, 0.08) 0%, rgba(15, 23, 42, 0.6) 100%);
}
.glfm-alert-important .glfm-alert-header { color: #a78bfa; }

.glfm-alert-warning {
  border-left-color: #fbbf24;
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.08) 0%, rgba(15, 23, 42, 0.6) 100%);
}
.glfm-alert-warning .glfm-alert-header { color: #fbbf24; }

.glfm-alert-caution {
  border-left-color: #f43f5e;
  background: linear-gradient(90deg, rgba(244, 63, 94, 0.08) 0%, rgba(15, 23, 42, 0.6) 100%);
}
.glfm-alert-caution .glfm-alert-header { color: #f43f5e; }

/* GLFM Table */
.glfm-table-wrapper {
  margin: 1.5rem 0;
  border-radius: 0.875rem;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.6);
  background: rgba(15, 23, 42, 0.6);
  overflow-x: auto;
}

.glfm-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: left;
}

.glfm-content th {
  padding: 0.75rem 1rem;
  background: rgba(30, 41, 59, 0.9);
  color: #38bdf8;
  font-weight: 600;
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.glfm-content td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(51, 65, 85, 0.4);
  color: #cbd5e1;
}

.glfm-content tr:last-child td {
  border-bottom: none;
}

.glfm-content tr:hover td {
  background: rgba(30, 41, 59, 0.4);
}

/* GLFM Task Lists */
.glfm-content ul.task-list {
  list-style-type: none;
  padding-left: 0.25rem;
}

.glfm-content li.task-list-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.glfm-content input[type="checkbox"] {
  margin-top: 0.25rem;
  width: 1rem;
  height: 1rem;
  accent-color: #38bdf8;
  cursor: pointer;
  border-radius: 0.25rem;
}

/* KaTeX Math Container */
.glfm-math-block {
  margin: 1.5rem 0;
  padding: 1.25rem;
  border-radius: 0.875rem;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(51, 65, 85, 0.6);
  text-align: center;
  overflow-x: auto;
}

/* Mermaid Container */
.glfm-mermaid-block {
  margin: 1.5rem 0;
  padding: 1.25rem;
  border-radius: 0.875rem;
  background: rgba(9, 13, 24, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.25);
  display: flex;
  justify-content: center;
  overflow-x: auto;
}

.glfm-mermaid-block svg {
  max-width: 100%;
  height: auto;
}

/* Table of Contents */
.glfm-toc {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-radius: 0.875rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 4px 15px -2px rgba(0, 0, 0, 0.3);
}

.glfm-toc-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, monospace;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(51, 65, 85, 0.6);
}

.glfm-toc ul {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.85rem;
  space-y: 0.35rem;
}

.glfm-toc li {
  margin: 0.3rem 0;
}

.glfm-toc a {
  color: #94a3b8;
  border-bottom: none;
}

.glfm-toc a:hover {
  color: #38bdf8;
}

/* Collapsible Details */
.glfm-content details {
  margin: 1.25rem 0;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(51, 65, 85, 0.8);
  background: rgba(15, 23, 42, 0.6);
}

.glfm-content summary {
  font-weight: 600;
  color: #38bdf8;
  cursor: pointer;
  user-select: none;
}

.glfm-content summary:hover {
  color: #7dd3fc;
}

.glfm-content details[open] summary {
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(51, 65, 85, 0.4);
}


