:root {
    --background-color: #121212;
    --surface-color: #1e1e1e;
    --primary-color: #9b59b6; /* A nice purple */
    --text-color: #e0e0e0;
    --text-muted-color: #888;
    --border-color: #333;
    --spacing: 1.5rem;
    --border-radius: 8px;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* --- Main Layout --- */
.grid-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    height: 100vh;
    overflow: hidden;
}

aside {
    background-color: var(--surface-color);
    padding: var(--spacing);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

main {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
}

/* --- Sidebar --- */
.brand {
    font-size: 1.75rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
}
.brand a { color: var(--text-color); }

.node-index { list-style: none; padding: 0; margin: 0; }
.node-index a {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.node-index a:hover { background-color: rgba(255,255,255,0.05); text-decoration: none; }

/* --- Main Content Stream --- */
.stream-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: var(--spacing);
}

.stream-item {
    padding: var(--spacing) 0;
    border-bottom: 1px solid var(--border-color);
}
.stream-item:last-child { border-bottom: none; }

.stream-item-header {
    font-size: 0.8rem;
    color: var(--text-muted-color);
    margin-bottom: 0.5rem;
}

/* --- Input Form --- */
.input-container {
    padding: var(--spacing);
    border-top: 1px solid var(--border-color);
}

textarea {
    width: 100%;
    background-color: var(--surface-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    font-size: 1rem;
    resize: vertical;
    min-height: 50px;
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-size: 1rem;
    cursor: pointer;
    margin-top: 0.5rem;
    float: right;
}
button:hover { background-color: #8e44ad; }

/* --- Login/Register Forms --- */
.auth-container {
    max-width: 400px;
    margin: 5rem auto;
    padding: var(--spacing);
}
.auth-container input {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-color);
}

/* Responsive */
@media (max-width: 768px) {
    .grid-container { grid-template-columns: 1fr; }
    aside { display: none; /* Hide sidebar on mobile for now */ }
}