:root {
    --primary: #f97316;
    /* Orange like Classy Schema */
    --primary-hover: #ea580c;
    --bg-light: #ffffff;
    --bg-gray: #f8fafc;
    --border-color: #e2e8f0;
    --text-dark: #1e293b;
    --text-dim: #64748b;
    --sidebar-width: 250px;
    --header-height: 60px;
    --bg-card: #ffffff;
    --bg-main: #f8fafc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-gray);
    color: var(--text-dark);
    height: 100vh;
    overflow: hidden;
}

/* Layout */
.app-layout {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: #1e293b;
    /* Dark sidebar for contrast */
    color: white;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
}

.logo-area {
    height: var(--header-height);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1.5rem;
    background: #0f172a;
    font-weight: 600;
    font-size: 1.1rem;
}

.logo-area svg path {
    stroke: white;
    /* Override SVG stroke for dark sidebar */
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-item:hover,
.nav-item.active {
    background: #334155;
    color: white;
}

.nav-item.active {
    border-left-color: var(--primary);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-light);
}

.top-bar {
    height: var(--header-height);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    background: white;
}

.breadcrumbs {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-dim);
}

/* Split Layout (Left-Right) */
.split-container {
    display: flex;
    flex-direction: row;
    /* Horizontal split */
    flex: 1;
    overflow: hidden;
    height: calc(100vh - 60px);
    /* Full height minus top bar */
}

.pane {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    overflow: hidden;
    flex: 1;
    /* Equal width */
}

.top-pane {
    border-right: 1px solid var(--border-color);
    /* Separator */
    border-bottom: none;
}

.bottom-pane {
    background: var(--bg-main);
    /* Slightly different bg for contrast */
}

.pane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card);
    flex-shrink: 0;
}

.tabs {
    display: flex;
    gap: 0.5rem;
}

.tab-btn,
.view-btn {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    color: var(--text-dim);
    font-weight: 500;
    border-bottom: 2px solid transparent;
}

.tab-btn.active,
.view-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: rgba(249, 115, 22, 0.05);
}

.action-btn {
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: white;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.action-btn.primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn.primary:hover {
    background: var(--primary-hover);
}

.pane-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    padding: 0;
}

/* Input Area */
textarea {
    width: 100%;
    height: 100%;
    border: none;
    padding: 1rem;
    resize: none;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    outline: none;
    color: var(--text-dark);
}

.url-input-group {
    padding: 2rem;
    display: flex;
    gap: 1rem;
}

input[type="url"] {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    outline: none;
}

input[type="url"]:focus {
    border-color: var(--primary);
}

/* Output Area */
.tab-content,
.view-content {
    display: none;
    height: 100%;
}

.tab-content.active,
.view-content.active {
    display: block;
}

#network-container {
    width: 100%;
    height: 100%;
    background: #f8fafc;
}

#tree-container {
    padding: 1rem;
    overflow-y: auto;
    height: 100%;
}

.tree-item {
    margin-left: 1.5rem;
    padding: 0.25rem 0;
    font-family: monospace;
}

.tree-key {
    color: #64748b;
    font-weight: 600;
}

.tree-value {
    color: #0f172a;
}

#code-view pre {
    margin: 0;
    height: 100%;
    border-radius: 0;
}