:root {
    --lb-bg-dark: #0b0b0f;
    --lb-primary: #2563EB;
    --lb-text-main: #ffffff;
    --lb-text-muted: #a0a0b0;
    --lb-border: #2a2a35;
    --lb-font: 'Poppins', sans-serif;
}

/* =========================================
   SIDEBAR TREE (Interaction Updated)
   ========================================= */
.lb-docs-sidebar {
    font-family: var(--lb-font);
    padding: 10px 0;
    width: 100%;
}

.lb-tree-list, .lb-doc-posts { list-style: none; padding: 0; margin: 0; }
.lb-tree-list li, .lb-doc-posts li { margin: 0; padding: 0; }

/* --- 1. Category Headers (Toggle Trigger) --- */
.lb-tree-header {
    display: flex;
    align-items: center;
    padding: 10px 0;
    cursor: pointer; /* Interaction Cue */
    line-height: 1.4;
    position: relative;
    user-select: none; /* Prevents text highlighting on rapid clicking */
    transition: color 0.2s ease;
}

/* Icons */
.lb-cat-icon {
    width: 24px;
    text-align: center;
    margin-right: 8px;
    display: inline-block;
    transition: color 0.2s;
}

/* Label Wrapper */
.lb-cat-label {
    flex-grow: 1;
    display: flex;
    align-items: center;
}

/* Toggler Arrow */
.lb-toggler-icon {
    width: 20px;
    margin-right: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px; 
    color: inherit; /* Inherits current state color */
    transition: transform 0.3s ease;
}
.lb-placeholder { width: 25px; display: inline-block; }


/* --- 2. Submenus --- */
.lb-sub-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    padding-left: 12px; 
    margin-left: 9px;
    border-left: 1px solid var(--lb-border); 
}

/* Open State Animation */
.lb-tree-item.is-open > .lb-tree-header .lb-toggler-icon { transform: rotate(90deg); }
.lb-tree-item.is-open > .lb-sub-menu { max-height: 2000px; }


/* --- 3. Articles (The Links) --- */
.lb-doc-posts {
    margin-top: 5px;
    margin-bottom: 10px;
}

.lb-doc-posts li {
    margin-bottom: 2px;
}

.lb-doc-posts li a {
    display: block;
    padding: 8px 12px;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    position: relative;
}

/* Hover State (Light Pill) */
.lb-doc-posts li a:hover {
    background-color: rgba(255, 255, 255, 0.03);
    padding-left: 16px; 
}

/* Active State (Defined in PHP settings, but structure is here) */
.lb-doc-posts li.lb-current-doc a {
    border-top-left-radius: 2px;
    border-bottom-left-radius: 2px;
}


/* =========================================
   ALERT BOXES & NAV (Preserved)
   ========================================= */
.lb-box { display: flex; align-items: center; gap: 15px; padding: 16px 20px; border-radius: 8px; margin-bottom: 25px; font-family: var(--lb-font); font-size: 15px; line-height: 1.5; box-sizing: border-box; }
.lb-box-icon { display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; height: 100%; margin-top: 2px; }
.lb-box-content { flex-grow: 1; display: flex; flex-direction: column; justify-content: center; gap: 0 !important; }
.lb-box-content p, .lb-box-content div, .lb-box-content span { margin: 0 !important; padding: 0 !important; line-height: 1.5 !important; }
.lb-box-content br:first-child { display: none; }
.lb-box-info { background: rgba(37, 99, 235, 0.1); border: 1px solid var(--lb-primary); color: #dbeafe; }
.lb-box-info .lb-box-icon { color: var(--lb-primary); }
.lb-box-warning { background: rgba(234, 179, 8, 0.1); border: 1px solid #eab308; color: #fef08a; }
.lb-box-warning .lb-box-icon { color: #eab308; }
.lb-box-danger { background: rgba(239, 68, 68, 0.1); border: 1px solid #ef4444; color: #fee2e2; }
.lb-box-danger .lb-box-icon { color: #ef4444; }

.lb-breadcrumbs { font-family: var(--lb-font); font-size: 13px; color: var(--lb-text-muted); margin-bottom: 20px; display: flex; flex-wrap: wrap; align-items: center; }
.lb-breadcrumbs a, .lb-crumb-static { color: var(--lb-text-muted); text-decoration: none; transition: 0.2s; }
.lb-breadcrumbs a:hover { color: var(--lb-primary); }
.lb-breadcrumbs .sep { margin: 0 8px; opacity: 0.5; font-size: 11px; }
.lb-breadcrumbs .current { color: var(--lb-text-main); font-weight: 500; }

.lb-doc-nav { display: flex; justify-content: space-between; margin-top: 50px; padding-top: 30px; border-top: 1px solid var(--lb-border); gap: 20px; }
.lb-nav-prev, .lb-nav-next { display: flex; flex-direction: column; text-decoration: none; width: 48%; padding: 20px; border: 1px solid var(--lb-border); border-radius: 8px; transition: all 0.3s ease; background: rgba(255, 255, 255, 0.02); }
.lb-nav-next { align-items: flex-end; text-align: right; }
.lb-nav-prev:hover, .lb-nav-next:hover { border-color: var(--lb-primary); background: rgba(37, 99, 235, 0.05); transform: translateY(-2px); }
.lb-nav-label { font-size: 11px; color: var(--lb-text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.lb-nav-title { font-size: 15px; color: var(--lb-text-main); font-weight: 600; }

/* =========================================
   GLOSSARY & TOOLTIPS
   ========================================= */

/* The Word Itself */
.lb-glossary-term {
    cursor: help;
    border-bottom: 1px dotted var(--lb-text-muted); /* Subtle underline */
    text-decoration: none;
    position: relative;
    transition: color 0.2s, border-color 0.2s;
}

/* If it's a link, make it look clickable but distinct */
a.lb-glossary-link {
    text-decoration: none;
    color: inherit; /* Don't force blue, let the term style handle it */
}
a.lb-glossary-link:hover .lb-glossary-term {
    color: var(--lb-primary);
    border-bottom-color: var(--lb-primary);
}

/* Acronym specific styling (Browser default override) */
abbr.lb-glossary-term {
    text-decoration: none; /* Remove default browser dots */
    border-bottom: 1px dotted var(--lb-text-muted);
}

/* --- THE TOOLTIP (Pure CSS) --- */
.lb-glossary-term::before {
    content: attr(data-tooltip) attr(title); 
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px); 
    
    /* Box Styling */
    background: #1e1e24;
    color: #ffffff;
    padding: 10px 14px; /* Slightly more padding for the larger box */
    border-radius: 6px;
    font-size: 13px; /* Bumped font size slightly for readability */
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    line-height: 1.5;
    
    /* WIDTH CONTROL */
    white-space: normal; /* Allow text to wrap naturally */
    width: max-content;  /* Try to fit the text width... */
    max-width: 320px;    /* ...but stop growing at 320px (Previously 250px) */
    text-align: center;
    
    border: 1px solid #2a2a35;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    
    /* Interaction */
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
    pointer-events: none; 
}

/* The Arrow */
.lb-glossary-term::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: -5px; /* Pull it down to touch text */
    
    border-width: 5px;
    border-style: solid;
    border-color: #1e1e24 transparent transparent transparent;
    
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
}

/* Hover State */
.lb-glossary-term:hover::before,
.lb-glossary-term:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-10px); /* Slide up animation */
}

/* =========================================
   VIP SUPPORT CARD (Electric Style)
   ========================================= */
.lb-vip-card {
    display: block;
    position: relative;
    margin-top: 30px; /* Space from the tree menu */
    text-decoration: none;
    border-radius: 12px;
    overflow: hidden;
    /* The Electric Glow Base */
    box-shadow: 0 0 0 1px #2a2a35, 0 10px 30px rgba(0,0,0,0.5); 
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform: translateZ(0); /* Hardware accel */
    font-family: var(--lb-font);
}

/* Background Layer (Dark but slightly lifted) */
.lb-vip-background {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(145deg, #15151a 0%, #0b0b0f 100%);
    z-index: 1;
}

/* Content Layout */
.lb-vip-content {
    position: relative;
    z-index: 2; /* Sits above background */
    display: flex;
    align-items: center;
    padding: 16px;
    gap: 15px;
}

/* Discord Icon with specialized glow */
.lb-vip-icon-wrapper {
    width: 40px;
    height: 40px;
    background: rgba(88, 101, 242, 0.15); /* Discord Blurple Tint */
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #5865F2; /* Discord Color */
    border: 1px solid rgba(88, 101, 242, 0.3);
    transition: all 0.3s ease;
}

/* Text Details */
.lb-vip-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.lb-vip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.lb-vip-title {
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
}

/* The "PRO" Badge */
.lb-vip-badge {
    background: linear-gradient(90deg, #2563EB, #3b82f6);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.4);
}

.lb-vip-desc {
    color: #a0a0b0;
    font-size: 11px;
    line-height: 1.3;
    transition: color 0.3s;
}

/* --- HOVER EFFECTS (The "Electric" Surge) --- */
.lb-vip-card:hover {
    transform: translateY(-3px);
    /* Blue Electric Border Glow */
    box-shadow: 0 0 0 1px #2563EB, 0 15px 40px rgba(37, 99, 235, 0.25);
}

.lb-vip-card:hover .lb-vip-icon-wrapper {
    background: #5865F2;
    color: #ffffff;
    border-color: #5865F2;
    box-shadow: 0 0 15px rgba(88, 101, 242, 0.6);
    transform: scale(1.1) rotate(-5deg); /* Playful nudge */
}

.lb-vip-card:hover .lb-vip-desc {
    color: #ffffff; /* Text lights up */
}

/* =========================================
   CODE SYNTAX BOX (Electric Theme)
   ========================================= */
.lb-code-wrapper {
    background: #15151a; /* Card Background */
    border: 1px solid #2a2a35;
    border-radius: 8px;
    margin-bottom: 25px;
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* Header Bar */
.lb-code-header {
    background: #0b0b0f; /* Darker header */
    border-bottom: 1px solid #2a2a35;
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Language Label */
.lb-code-lang {
    font-size: 12px;
    font-weight: 600;
    color: #a0a0b0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Copy Button */
.lb-copy-btn {
    background: transparent;
    border: none;
    color: #a0a0b0;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: inherit;
}

.lb-copy-btn:hover {
    color: #ffffff;
    background: rgba(255,255,255,0.05);
}

.lb-copy-btn i { font-size: 14px; }

/* Success State (Added via JS) */
.lb-copy-btn.copied {
    color: #10b981; /* Green success color */
}

/* Code Area Overrides (Prism.js) */
.lb-code-body {
    padding: 0;
    background: #15151a;
    position: relative;
}

/* Force Prism to be transparent so our background shows */
.lb-code-body pre[class*="language-"] {
    margin: 0;
    padding: 20px;
    background: transparent;
    text-shadow: none;
    font-family: 'Consolas', 'Monaco', 'Andale Mono', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
    border: none;
    box-shadow: none;
    overflow: auto; /* Scrollbars if needed */
}

.lb-code-body code[class*="language-"] {
    background: transparent;
    color: #e2e8f0; /* Default text color */
    text-shadow: none;
}

/* Scrollbar styling for code */
.lb-code-body pre::-webkit-scrollbar { height: 8px; }
.lb-code-body pre::-webkit-scrollbar-track { background: #0b0b0f; }
.lb-code-body pre::-webkit-scrollbar-thumb { background: #2a2a35; border-radius: 4px; }
.lb-code-body pre::-webkit-scrollbar-thumb:hover { background: #2563EB; }