/* --- Confluence-Style Dark Theme --- */

html, body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    background-color: #1b1d21;
    color: #dee4ea;
    height: 100%;
    overflow: hidden;
}

body {
    display: grid;
    grid-template-areas:
        "header header"
        "sidebar content";
    grid-template-columns: 250px 1fr;
    grid-template-rows: auto 1fr;
    height: 100vh;
}

/* Header */
.site-header {
    grid-area: header;
    background-color: #2c333a;
    padding: 1rem;
    color: #dee4ea;
    border-bottom: 1px solid #3d4754;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.logo {
    height: 40px;
    margin-right: 10px;
}

/* Sidebar */
.site-nav {
    grid-area: sidebar;
    background-color: #2c333a;
    padding: 1rem;
    overflow-y: auto;
    border-right: 1px solid #3d4754;
}

.site-nav ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.site-nav li {
    margin: 8px 0;
}

.site-nav a {
    text-decoration: none;
    color: #579dff;
    font-weight: bold;
}

.site-nav a:hover {
    color: #85b8ff;
}

/* Main Content */
main {
    grid-area: content;
    padding: 2rem;
    overflow-y: auto;
    background-color: #22272b;
}

.intro {
    padding-bottom: 1rem;
    border-bottom: 1px solid #3d4754;
}

/* Tree View */
.tree-container {
    margin-top: 1rem;
}

.tree {
    list-style: none;
    padding-left: 1rem;
    font-family: Consolas, monospace;
}

.tree .folder {
    cursor: pointer;
    color: #579dff;
    font-weight: bold;
    display: block;
    margin: 5px 0;
}

.tree ul {
    display: none;
    padding-left: 1.5rem;
}

.tree a {
    text-decoration: none;
    color: #b6c2cf;
}

.tree a:hover {
    color: #85b8ff;
}

/* Footer */
.site-footer {
    background-color: #2c333a;
    color: #dee4ea;
    padding: 1rem;
    text-align: center;
    border-top: 1px solid #3d4754;
    font-size: 0.9rem;
}
/* Modal styling */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: none;
    z-index: 200;
}

.modal-content {
    background: #2c333a;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #444;
    width: 50%;
    color: #fff;
    border-radius: 8px;
}

.close {
    float: right;
    font-size: 20px;
    cursor: pointer;
    color: #aaa;
}
.close:hover {
    color: #fff;
}

.btn-new-page {
    background: #579dff;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 10px;
}
.btn-new-page:hover {
    background: #1d7aee;
}
