:root {
    --primary-bg: #000000; /* Black background for the whole page */
    --sidebar-bg: #000000; /* Black sidebar to match */
    --content-bg: #ffffff;
    --text-color: #222; /* Darker text for better contrast on white */
    --primary-color: #007bff;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.08); /* Slightly darker shadow for white cards */
    --input-bg: #f9f9f9;
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    background-color: var(--primary-bg);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 300px;
    background-color: var(--sidebar-bg);
    padding: 2rem;
    border-right: 1px solid #2c3138; /* Subtle border */
    display: flex; /* Use flexbox for layout */
    flex-direction: column; /* Stack children vertically */
    height: 90vh; /* Make sidebar take full viewport height */
    color: #ffffff; /* Ensure all text in sidebar is white */
    flex-shrink: 0;
}

.sidebar h1 {
    font-size: 1.5rem;
    font-weight: 700; /* Bold heading */
    margin-top: 0;
    color: #ffffff; /* White text on black background */
    text-align: center; /* Centered heading */
    padding-bottom: 2rem; /* Space below heading */
    border-bottom: 1px solid #2c3138; /* Separator line */
}

.content {
    flex-grow: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    min-width: 0; /* Prevents content from overflowing */
}

/* New container for the scrollable tree view */
.tree-view-scroll-container {
    flex-grow: 1; /* Allow it to take up remaining space */
    overflow-y: auto; /* Enable vertical scrolling */
    padding-right: 10px; /* Add some padding for the scrollbar to prevent content overlap */
}

/* Style for headings within the form section */
.form-section h2 {
    margin-top: 0;
    font-weight: 700; /* Bold heading */
}

.tab-bar {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.tab {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border: 1px solid transparent;
    border-bottom: none;
    position: relative;
    background-color: #e9ecef;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 2px;
}

.tab:hover {
    background-color: #dee2e6;
}

.tab.active {
    background-color: var(--content-bg);
    border-color: var(--border-color);
    margin-bottom: -1px; /* Pulls it over the border */
    font-weight: 500;
}

.tab-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    padding: 2px 5px;
    color: #6c757d;
    border-radius: 50%;
}

.tab-close:hover {
    color: #212529;
    background-color: #d3d9df;
}

.tab-content {
    flex-grow: 1;
    position: relative;
}

.tab-pane {
    display: none; /* Hide by default */
    background-color: var(--content-bg);
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 8px;
    border-top-left-radius: 0;
    box-shadow: 0 2px 10px var(--shadow-color);
    height: 100%;
    box-sizing: border-box;
    overflow-y: auto;
}

.tab-pane.active {
    display: block; /* Show active tab */
}

.initial-message {
    padding: 4rem 2rem;
    text-align: center;
    color: #6c757d;
}

.api-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* Style for labels inside the dark sidebar */
.sidebar label {
    color: #e0e0e0;
}

input[type="text"],
input[type="number"],
input[type="email"],
.select-css {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    background-color: var(--input-bg);
    box-sizing: border-box;
}

/* Style for select dropdown inside the dark sidebar */
.sidebar .select-css {
    background-color: #2c3138;
    color: #f0f0f0;
    border-color: #444;
}

input:focus, .select-css:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.2s ease-in-out;
}

.btn:hover {
    background-color: #0056b3;
}

.response-section h2 {
    margin-top: 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    font-weight: 700; /* Bold heading */
}

pre {
    background-color: #2d2d2d;
    color: #f8f8f2;
    padding: 1rem;
    border-radius: 4px;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', Courier, monospace;
}

 /* Sidebar specific styles for text elements */
.sidebar label {
    color: #ffffff; /* Ensure labels are white for readability on dark background */
}

.sidebar input[type="text"],
.sidebar input[type="number"],
.sidebar input[type="email"] {
    color: #ffffff; /* Ensure text input is white for readability */
    background-color: #2c3138; /* Slightly darker background for inputs in sidebar */
    border-color: #444; /* Darker border for inputs */
}

.sidebar input::placeholder {
    color: #cccccc; /* Lighter placeholder text */
}

.tree-view li {
    margin: 0.25rem 0;
}

.folder-node, .endpoint-node {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.folder-node:hover, .endpoint-node:hover {
    background-color: #2c3138; /* Slightly lighter black on hover */
}

.folder-node .folder-icon {
    display: inline-block;
    width: 12px; /* Space for the arrow */
    text-align: center;
    transition: transform 0.2s ease-in-out;
}

.folder-node.expanded .folder-icon {
    transform: rotate(90deg); /* Down arrow */
}

/* Hide children of collapsed folders */
.folder-node.collapsed + ul {
    display: none;
}

/* Style for active endpoint in the tree view */
.endpoint-node.active {
    background-color: var(--primary-color); /* Highlight active endpoint */
    color: #fff;
}

.endpoint-node.active:hover {
    background-color: #0056b3; /* Darker blue on hover for active */
}


.tree-view ul {
    list-style: none;
    padding-left: 15px; /* Indent children */
    margin: 0; /* Remove default list margins */
.endpoint-node.active:hover {
    background-color: #0056b3; /* Darker blue on hover for active */
}
/* Tree View Styles (re-added for clarity, though already white) */
.tree-view {
    margin-top: 1rem;
    color: #ffffff; /* Brighter white text for tree view for better readability */
}