body {
    display: grid;
    height: 98vh;
    grid-template-rows: 10vh auto;
    grid-template-columns: auto;
    gap: 0;
}

.nav-bar {
    grid-row: 1;
    grid-column: 1;
    background-color: #333;
    ul {
        list-style-type: none;
        margin: 0;
        padding: 0;
        overflow: hidden;
        background-color: #333;
    }

    /* left item */
    li {
        display: flex;
        align-items: center;
        justify-content: center;
        float: left;
        height: 10vh;
    }

    #login {
        float: right;
        padding-right: 15px;
    }

    li a {
        display: block;
        color: white;
        text-align: center;
        padding: 34px 16px;
        text-decoration: none;
    }

    li a:hover {
        background-color: #111;
    }

    li p {
        display: block;
        color: white;
        text-align: center;
        padding: 0px 16px;
        text-decoration: none;
        width: 120px;
    }

    button {
        display: block;
        color: white;
        text-align: center;
        padding: 34px 16px;
        text-decoration: none;
    }

    #logout-button {
        display: block;
        color: black;
        text-align: center;
        padding: 34px 16px;
        text-decoration: none;
    }

}

.controls {
    margin-top: 1rem;
    display: flex;
    gap: 10px;
    justify-content: center;
}


.login-content {
    display: flex;
    justify-content: center;


    button {
        display: block;
        padding: 1rem;
        font-size: 1rem;
        background: #222;
        color: #fff;
        border: none;
        cursor: pointer;
    }

    button:hover {
        background: #444;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"] {
        display: block;
        float: center;
        padding: 1rem;
        font-size: 1rem;
        border: 1px solid #222;
        outline: none;
    }

    input[type="text"]:focus {
        border-color: #444;
    }
}

a {
    color: #9a81d6;
    text-decoration: none;
    text-shadow: 4px 4px black;
    font-family: "Lucida Console", "Courier New", monospace;
    font-size: 90%;
}

a:hover {
    color: #ae91f2;
    text-decoration: none;
    text-shadow: 4px 4px black;
    font-family: "Lucida Console", "Courier New", monospace;
}

.site-footer {
    color: white;
    padding: 20px;
    text-align: center;

    a {
        color: #383481;
        text-decoration: none;
    }

    ul {
        list-style-type: none;
        padding: 0;
    }

    ul li {
        display: inline;
        margin: 0 10px;
    }

    .content-wrap {
        flex: 1;
        /* This stretches content to push footer down */
    }
}

.visualizer-wrapper {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
    font-family: sans-serif;
    color: #eee;
}

.visualizer-wrapper h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #fff;
}

.chart-container {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 1.5rem;
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    box-sizing: border-box;
    height: 92vh;
    display: flex;
    flex-direction: column;
}

.chart-canvas-wrap {
    position: relative;
    flex: 1;
    min-height: 0;
}

/* Scroll bar */
.chart-scroll-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 0.8rem;
}

.chart-scroll-bar input[type="range"] {
    flex: 1;
    accent-color: #4e79a7;
    cursor: pointer;
}

.chart-scroll-bar span {
    font-size: 0.8rem;
    color: #333;
    white-space: nowrap;
    min-width: 90px;
    text-align: right;
}


/* Data editor */
.data-editor {
    margin-top: 1.5rem;
    background: #111;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 1.2rem;
}

.data-editor h2 {
    margin: 0 0 1rem;
    font-size: 1rem;
    color: #333;
}

.data-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 1rem;
    max-height: 260px;
    overflow-y: auto;
}

.data-row {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr 1fr auto;
    gap: 8px;
    align-items: center;
}

.data-row input {
    padding: 0.4rem 0.6rem;
    font-size: 0.88rem;
    background: #333;
    color: #fff;
    border: 1px solid #333;
    border-radius: 3px;
    width: 100%;
    box-sizing: border-box;
}

.data-row input:focus {
    outline: none;
    border-color: #666;
}

.remove-row {
    background: #5c1a1a;
    border: none;
    color: #f88;
    cursor: pointer;
    padding: 0.3rem 0.6rem;
    border-radius: 3px;
    font-size: 0.85rem;
}

.remove-row:hover {
    background: #7a2020;
}

.editor-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.editor-actions button {
    padding: 0.45rem 0.9rem;
    font-size: 0.88rem;
    background: #333;
    color: #fff;
    border: 1px solid #333;
    border-radius: 3px;
    cursor: pointer;
}

.editor-actions button:hover {
    background: #444;
}

.col-header {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr 1fr auto;
    gap: 8px;
    font-size: 0.75rem;
    color: #333;
    margin-bottom: 4px;
    padding: 0 2px;
}

.dataset-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.dataset-controls button {
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    background: #333;
    color: #fff;
    border: 1px solid #333;
    cursor: pointer;
    border-radius: 3px;
}

.dataset-controls button:hover,
.dataset-controls button.active {
    background: #333;
    outline: none;
}

.dataset-controls button.add-ds {
    border-style: dashed;
    color: #aaa;
}

.dataset-controls button.add-ds:hover {
    color: #fff;
    background: #2a2a2a;
}

.ds-btn {
    display: flex;
    align-items: center;
    gap: 6px;
}

#ds-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    color: white;
}

.ds-remove {
    font-size: 0.75rem;
    color: #888;
    line-height: 1;
    padding: 1px 3px;
    border-radius: 2px;
}

.ds-remove:hover {
    color: #f88;
    background: rgba(255, 80, 80, 0.15);
}

/* New dataset modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: #333;
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.modal-overlay.open {
    display: flex;
}

.modal-box {
    background: #1e1e1e;
    border: 1px solid #555;
    border-radius: 6px;
    padding: 1.5rem;
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-box h3 {
    margin: 0;
    font-size: 1rem;
    color: #fff;
}

.modal-box input {
    padding: 0.5rem 0.7rem;
    font-size: 0.9rem;
    background: #333;
    color: #fff;
    border: 1px solid #333;
    border-radius: 3px;
}

.modal-box input:focus {
    outline: none;
    border-color: #666;
}

.modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.modal-actions button {
    padding: 0.4rem 0.9rem;
    font-size: 0.88rem;
    background: #333;
    color: #fff;
    border: 1px solid #333;
    border-radius: 3px;
    cursor: pointer;
}

.modal-actions button:hover {
    background: #444;
}

.modal-actions button.confirm {
    background: #1a3a1a;
    border-color: #4a7a4a;
}

.modal-actions button.confirm:hover {
    background: #2a5a2a;
}

main {
    grid-row: 2;
    grid-column: 1;
    background-color: #333;
    color: #cfcfcf;
    padding: 20px;
    height: auto;
    font-family: 'Lucida Console';
    background-image: url('https://i.postimg.cc/mgJQfY4y/imageedit-2-5743939271.png');
    margin: 0;
}
.a-home {
    color: #9a81d6;
    text-decoration: none;
    text-shadow: 4px 4px black;
    font-family: "Lucida Console", "Courier New", monospace;
    font-size: 90%;
}
.a-home:hover {
    color: #ae91f2;
    text-decoration: none;
    text-shadow: 4px 4px black;
    font-family: "Lucida Console", "Courier New", monospace;
}
.h1-home {
    text-shadow: 4px 4px #5c5c5c;
    font-size: 300%;
}
.h2-home {
    text-shadow: 2px 2px #5b5b5b;
    color: #b8b8b8;
    font-size: 105%;
}
.p-home {
    margin: 20px;
}
.div-home {
    background-color: #262533;
    border-radius: 5px;
    margin-top: 2rem;
    padding: 1rem;
    box-shadow: 5px 10px 8px #222226;
    opacity: 70%;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}
.underheader-home {
    font-size: 150%;
}
