/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: #0f0f17;
    color: #e0e0ff;
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll during transitions */
}

/* Variables for easy theme management */
:root {
    --sidebar-width: 280px;
    --nav-height: 80px;
    --accent: #66d9ef;
    --accent-glow: rgba(102, 217, 239, 0.28);
    --bg-dark: #0f0f17;
    --bg-sidebar: #12121f;
    --border: #1e1e38;
    --transition-speed: 0.35s; /* Standard speed for all animations */
    --tutorial-accent: #748cf7fb;
}

/* ==========================================================================
   LAYOUT STRUCTURE
   ========================================================================== */
.main-wrapper {
    display: flex;
    margin-top: var(--nav-height);
    min-height: calc(100vh - var(--nav-height));
    width: 100%;
}

/* ==========================================================================
   TOP NAVIGATION BAR
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(15, 15, 23, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    height: var(--nav-height);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    max-width: 100%;
    padding: 0 40px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--accent);
    text-transform: uppercase;
}

/* Primary Button (Generate Categories) */
.btn-primary {
    display: inline-block;
    padding: 10px 24px;
    background: var(--accent);
    color: #0f0f17;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.25s ease;
}

.btn-primary:hover {
    background: #89e0f0;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--accent-glow);
}

/* ==========================================================================
   SIDEBAR NAVIGATION (Collapsible)
   ========================================================================== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    position: fixed;
    left: 0;
    height: calc(100vh - var(--nav-height));
    overflow-y: auto;
    transition: transform var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 95;
}

/* Class triggered via JavaScript to hide sidebar */
.sidebar.collapsed {
    transform: translateX(-100%);
}

.sidebar-content {
    padding: 40px 24px;
}

.sidebar-trigger {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: opacity 0.2s;
}

.sidebar-trigger:hover {
    opacity: 0.7;
}

/* Nav Logo Pic */

#nav-logo-pic {
    width: 150px;
    height: 150px;
    border-radius: 8px; 
    overflow: hidden;   
    display: flex;
    justify-content: center;
    justify-self: center;
    align-items: center;
}

#nav-logo-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;  
    object-position: center; 
    scale: 1.0;
}


/* Nav Groups & Links */
.nav-group {
    margin-bottom: 32px;
}

.nav-group h3 {
    color: #56567a;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    padding-left: 12px;
}

.nav-group ul {
    list-style: none;
}

.nav-group ul li a {
    display: block;
    padding: 10px 12px;
    color: #c3c3ff;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.nav-group ul li a:hover, .nav-group ul li a.active {
    background: rgba(102, 217, 239, 0.1);
    color: var(--accent);
}

.nav-group ul li a.active {
    font-weight: 600;
}

/* ==========================================================================
   MAIN CONTENT AREA (Fluid/Full-Width)
   ========================================================================== */
.content {
    flex: 1;
    /* Margin matches sidebar width to prevent overlap */
    margin-left: var(--sidebar-width); 
    padding: 60px 8%; /* Percentage padding for responsiveness */
    width: 100%;
    transition: margin-left var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
}

/* Expand content when sidebar is collapsed */
.sidebar.collapsed + .content {
    margin-left: 0;
}

.doc-section {
    margin-bottom: 80px;
    scroll-margin-top: 110px; /* Offset for fixed header */
    max-width: 1400px; /* Limit line length for readability on ultrawide */
    margin-left: auto;
    margin-right: auto;
}

.hero-subtitle {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--accent);
    margin-bottom: 24px;
    font-weight: 800;
}

/* ==========================================================================
   ELEMENTS & UTILITIES
   ========================================================================== */
.about-text {
    font-size: 1.15rem;
    color: #d0d0e8;
    margin-bottom: 1.5em;
}

code {
    background: #1e1e30;
    padding: 3px 8px;
    border-radius: 6px;
    color: #f8f8f2;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.9em;
    border: 1px solid #2a2a4a;
}

a { 
    text-decoration: none;
    color: var(--accent);
    transition: color 0.25s ease;
    transform: scale(1.05);
}

a:hover {
    color: #a1ecff;
    text-shadow: #00d9ff 0 0 25px;
    transform: scale(1.1);}

.list-remark {
    color: var(--accent);
    font-weight: bold;
}

.important-box {
    background: rgba(102, 217, 239, 0.1); 
    border-left: 4px solid var(--accent); 
    padding: 20px; 
    margin: 20px 0; 
    border-radius: 4px;
}

.security-box {
    background: rgba(255, 166, 0, 0.1); 
    border-left: 4px solid orange; 
    padding: 20px; 
    margin: 20px 0; 
    border-radius: 4px; 
    color: #ffcc80;
}

.faq-text {
    font-size: 0.85rem; 
    margin-top: 10px; 
    padding-top: 15px; 
    padding-bottom: 10px;
}

details summary {
    cursor: pointer;          
    transition: all 0.3s ease; 
            
}

details summary:hover {
    color: #50e5ff;           
    text-shadow: 0 0 12px rgba(59, 216, 255, 0.6); 
    transform: translateX(5px); 
}

details summary::marker { color: #26a6bd; }

details summary:hover::marker { color: #50e5ff; }

/* --- CUSTOM SIDEBAR SCROLLBAR --- */

/* 1. Scrollbar width: Set to a thin size for a modern, elegant look */
#sidebar::-webkit-scrollbar {
    width: 6px;
}

/* 2. Scrollbar Track: The background path of the scrollbar */
#sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2); 
    border-radius: 10px;
}

/* 3. Scrollbar Thumb: The draggable part that indicates current position */
#sidebar::-webkit-scrollbar-thumb {
    background: var(--accent); /* Uses your defined accent color */
    border-radius: 10px;
    transition: background 0.3s ease;
}

/* 4. Thumb Hover state: Adds a slight glow or brightness when hovered */
#sidebar::-webkit-scrollbar-thumb:hover {
    background: #ff9d00; /* A slightly lighter version of your accent color */
    cursor: pointer;
}

/* --- FIREFOX COMPATIBILITY --- */
/* Firefox uses different properties for scrollbar styling */
#sidebar {
    scrollbar-width: thin;
    scrollbar-color: var(--accent) rgba(0, 0, 0, 0.2);
}

/* --- MAIN SITE SCROLLBAR (GLOBAL) --- */

/* 1. Scrollbar width: Slightly wider than the sidebar for better accessibility */
::-webkit-scrollbar {
    width: 10px;
}

/* 2. Scrollbar Track: Matches the deep dark background of your site */
::-webkit-scrollbar-track {
    background: #0f0f1e; /* Adjust this to match your exact body background color */
}

/* 3. Scrollbar Thumb: The draggable pill */
::-webkit-scrollbar-thumb {
    background: #2a2a4a; /* A subtle dark blue/gray to not distract from content */
    border-radius: 10px;
    border: 2px solid #0f0f1e; /* Creates a "padding" effect around the thumb */
    transition: background 0.3s ease;
}

/* 4. Thumb Hover: Highlights with your accent color when the user interacts with it */
::-webkit-scrollbar-thumb:hover {
    background: var(--accent); 
    cursor: pointer;
}

/* --- FIREFOX COMPATIBILITY --- */
/* Firefox global scrollbar styling */
html {
    scrollbar-width: auto;
    scrollbar-color: #2a2a4a #0f0f1e;
}

/* Container to center everything */
.n1h1lius-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.n1h1lius {
    display: flex;
    align-items: center;
    gap: 12px; /* Space between icons and name */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* The name styling */
.logo-name {
    color: var(--accent);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.6rem;
    transition: color 0.5s ease;
}

.social-link {
    color: #707090; 
    font-size: 1.2rem;
    text-decoration: none;
    transition: color 0.5s ease;
}

.social-link:hover, .logo-name:hover {
    transform: scale(1.05);
    color: var(--accent); 
}

.social-link:hover, .logo-name:hover {
    transform: scale(1.05);
    color: #fff;
    filter: drop-shadow(0 0 5px var(--accent));
}


/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

/* Tablet & Mobile Layout (900px and down) */
@media (max-width: 900px) {
    .sidebar {
        width: 100%; /* Full screen overlay on mobile */
        transform: translateX(-100%); /* Hidden by default */
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .content {
        margin-left: 0 !important; /* Content always full width on mobile */
        padding: 40px 24px;
    }

    .navbar-container {
        padding: 0 20px;
    }

    .logo {
        font-size: 1.3rem;
    }

    /* Hide desktop toggle if needed, or keep it for the mobile drawer */
}

/* Small Phone Adjustments */
@media (max-width: 640px) {
    .header-actions {
        display: none; /* Hide large button on very small screens to save space */
    }
}

/* JSON CODE */

#json-structure-code {
    background: #1e1e30;
}

pre .json, code .json{
    line-height: 2.5;
    
    padding: 1rem;
    border-radius: 0px;
    
    font-size: 1.05rem;
    background: none;
    border: none;
}



/* JSON COLOR STYLES */
code .json-key { color: var(--json-key);}
code .json-string {color: var(--json-string);}
code .json-number {color: var(--json-number);}
code .json-boolean {color: var(--json-boolean);}
code .json-null {color: var(--json-null);}
code .json-default {color: var(--json-default);}

/* MARKDOWN COLOR STYLES */
code .mk-red {color: var(--mk-red);}
code .mk-blue {color: var(--mk-blue);}

/* --- EPIC LOGO DISPLAY --- */
.logo-display-container {
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px; /* Adds subtle depth */
}

.logo-frame {
    position: relative;
    padding: 10px;
    background: linear-gradient(135px, var(--accent), #1a1a2e);
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5), 
                0 0 15px var(--accent); /* Glow effect */
    max-width: 900px; /* Size limit for desktop */
    width: 90%; /* Responsive for mobile */
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-logo {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 15px; /* Matches the frame */
    border: 2px solid rgba(255, 255, 255, 0.05); /* Very subtle highlight */
    filter: brightness(1.1) contrast(1.1); /* Makes the logo pop */
}

/* Subtle hover animation */
.logo-frame:hover {
    transform: translateY(-5px) rotateX(2deg);
    box-shadow: 0 0 45px var(--accent);
}

/* Decorative background glow behind the frame */
.logo-frame::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    opacity: 0.15;
    z-index: -1;
}