body {
    background: #F9FAFB;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #1E293B;
    scroll-behavior: smooth;
}

body * {
    box-sizing: border-box;
}

#container {
    display: flex;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    flex-direction: row;
}

/* --- MENU BOCZNE --- */
#menu {
    display: flex;
    width: 280px;
    height: 100%;
    background-color: white;
    overflow-y: auto;
    overflow-x: hidden;
    flex-direction: column;
    border-right: 1px solid #E2E8F0;
scrollbar-width: thin; /* Dla Firefox */
    scrollbar-color: #E2E8F0 white;
}

/* Dla Chrome/Safari/Edge */
#menu::-webkit-scrollbar {
    width: 6px;
}
#menu::-webkit-scrollbar-thumb {
    background-color: #E2E8F0;
    border-radius: 10px;
}

#menu_header {
    display: flex;
    height: 80px;
    width: 100%;
    flex-direction: row;
    align-items: center;
    padding: 0 24px;
    gap: 12px;
    background-color: #FFFFFF;
    flex-shrink: 0;
}

#hr_menu_header {
    border: none;
    border-top: 1px solid #F1F5F9;
    margin: 0 20px;
}

#menu_header svg {
    width: 28px;
    height: 28px;
    color: rgb(79 70 229);
}

#menu_header h1 {
    color: #0F172A;
    font-size: 18px;
    margin: 0;
    font-weight: 700;
}

#menu h2 {
    color: #94A3B8;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
    width: 100%;
    text-align: left;
    padding: 24px 24px 8px 24px;
    font-weight: 700;
}

#menu_paths {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 12px;
}

/* --- KONTENER ŚCIEŻKI I ROZWIJANIE --- */
.menu_path_container {
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.menu_path {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.menu_path:hover {
    background-color: #F1F5F9;
}

.menu_path .menu_path_icon {
    display: flex;
    width: 28px;
    height: 28px;
    background-color: #F1F5F9;
    color: #64748B;
    font-size: 10px;
    font-weight: 700;
    border-radius: 6px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.menu_path .menu_path_title {
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    flex: 1;
}

.menu_path_chevron {
    font-size: 10px;
    color: #94A3B8;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- STANY AKTYWNE --- */
.menu_path_container.active .menu_path {
    background-color: #F5F7FF;
}

.menu_path_container.active .menu_path_icon {
    background-color: rgb(79 70 229);
    color: white;
}

.menu_path_container.active .menu_path_title {
    color: rgb(79 70 229);
}

.menu_path_container.active .menu_path_chevron {
    transform: rotate(180deg);
    color: rgb(79 70 229);
}

/* --- PODMENU POZIOM 1 --- */
.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    padding-left: 32px;
}

.menu_path_container.active .submenu {
    max-height: 1000px;
    padding-bottom: 8px;
}

.submenu_item {
    display: flex;
    flex-direction: column;
    padding: 6px 0;
    text-decoration: none;
}

.submenu_link {
    padding: 6px 12px;
    font-size: 13px;
    color: #64748B;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
    cursor: pointer;
}

.submenu_link:hover {
    color: rgb(79 70 229);
    background-color: #F8FAFC;
}

.submenu_link.active {
    color: rgb(79 70 229);
    font-weight: 600;
    background-color: #F5F7FF;
}

/* --- PODMENU POZIOM 2 (WCIĘCIE) --- */
.sub_submenu {
    display: flex;
    flex-direction: column;
    padding-left: 16px;
    margin-top: 2px;
    border-left: 1px solid #E2E8F0;
    margin-left: 12px;
}

.sub_link {
    padding: 4px 12px;
    font-size: 12px;
    color: #94A3B8;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
    cursor: pointer;
}

.sub_link:hover {
    color: rgb(79 70 229);
    background-color: #F1F5F9;
}

.sub_link.active {
    color: rgb(79 70 229);
    font-weight: 600;
}

/* --- KONTO --- */
#menu #account {
    margin-top: auto;
    padding: 20px;
    border-top: 1px solid #F1F5F9;
    display: flex;
    align-items: center;
    gap: 12px;
}

#menu #account #account_logo {
    display: flex;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, rgb(79 70 229), #9333ea);
    color: white;
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
}

#menu #account #account_title {
    font-size: 14px;
    font-weight: 700;
    color: #1E293B;
}

/* --- MAIN CONTENT --- */
#main {
    background-color: #F8FAFC;
    flex: 1;
    padding: 48px;
    overflow-y: auto;
}

.section {
    display: none;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section.active {
    display: block;
}

h1:not(.snippet-html h1) {
font-size: clamp(18px, 4vw, 32px);
    font-weight: 800;
    color: #0F172A;
}

p:not(.snippet-html p) {
font-size: clamp(13px, 1.5vw, 16px);
    line-height: 1.6;
    color: #475569;
}

.arrow-down::after {
    content: '▼';
    font-size: 9px;
    display: inline-block;
}

.snippet {
    margin-top: 30px;
    margin-bottom: 30px;
    animation: fadeIn 0.6s ease-out;
}


.submenu_link, .sub_link {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.submenu_link:hover {
    transform: translateX(4px); /* Delikatne przesunięcie w prawo */
    background-color: #EEF2FF;
}

.snippet-html {
    display: block;
    width: 100%;
    min-height: 20px;
    background-color: #F1F5F9;
    border-radius: 10px;
    padding: 14px;
    margin: 8px 0;
    overflow-x: auto;
    border: 1px solid #E2E8F0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.snippet-html * {
}

.snippet h2 {
    font-size: 18px;
    margin-bottom: 10px;
}

.section-divider {
border: none;
    height: 5px;
    background: linear-gradient(to right, transparent, #bac5d3, transparent);
    margin: 40px 0;
}

.section ul:not(.snippet-html ul) {
    list-style: none; /* Wyłączamy standardowe kropki */
    padding-left: 0;
}

.section ul:not(.snippet-html ul) li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 12px;
}

.section ul:not(.snippet-html ul) li::before {
    content: "•";
    color: #4F46E5;
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 20px;
    line-height: 1;
}

.submenu_link.active {
    border-left: 3px solid rgb(79 70 229);
    border-radius: 0 6px 6px 0;
}

.sub_link.active {
    border-left: 3px solid rgb(79 70 229);
    border-radius: 0 6px 6px 0;
}

.label {
    display: inline-block;
    font-size: 12px;
    background: #333;
    padding: 4px 8px;
    border-radius: 6px;
    margin-left: 8px;
    vertical-align: middle;
}

pre {
    border-radius: 10px;
    padding: 14px;
    white-space: pre-wrap;       /* Zawijanie długich linii kodu */
    word-break: break-all;
    max-width: 100%;
    overflow-x: auto;
}

pre code {
    /* Zapobiega zbyt wielkiemu kodowi na małych ekranach */
font-size: clamp(11px, 1.2vw, 14px);
}

@media (max-width: 900px) {
    #container {
        flex-direction: column; /* Menu nad treścią lub ukryte */
        height: auto;
        overflow: visible;
    }

    #menu {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #E2E8F0;
        position: relative; /* Pozwala na scrollowanie strony zamiast tylko menu */
    }

#main {
        padding: 16px;
    }
}

.mobile-only {
    display: none;
}

@media (max-width: 900px) {
    /* Styl przycisku */
    #mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 24px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        margin-left: auto;
    }

    #mobile-menu-toggle span {
        width: 100%;
        height: 3px;
        background-color: #4F46E5;
        border-radius: 10px;
        transition: all 0.3s linear;
    }

    /* Ukrywanie/Pokazywanie zawartości menu */
    #menu_paths, #account, #hr_menu_header, #menu h2 {
        display: none; 
    }

    /* Gdy menu ma klasę .open, pokazujemy wszystko */
    #menu.open #menu_paths, 
    #menu.open #account, 
    #menu.open #hr_menu_header, 
    #menu.open #menu h2 {
        display: flex;
    }
    
    #menu.open {
        height: 100vh; /* Rozciągnij menu na cały ekran po otwarciu */
        position: fixed;
        z-index: 1000;
    }
}