html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: #272822;
    box-sizing: border-box;
}

#topbar {
    background-color: #1e1e1e;
    color: white;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    /* Align left, center, and right content */
    align-items: center;
    border-bottom: solid 1px #4e4e4e;
    width: 100%;
    position: fixed;
    /* Keep it fixed at the top */
    top: 0;
    left: 0;
    z-index: 1000;
    box-sizing: border-box;
}

/* The left side, including the filename input */
#left-buttons {
    display: flex;
    flex-shrink: 1;
}

#left-buttons input {
    color: white;
    background-color: #444;
    border: solid 1px #4e4e4e;
    padding: 4px;
    width: 10rem;
    font-size: 1rem;
    border-radius: 4px;
}

/* The center button, placed centrally */
#center-button {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
}

#center-button button {
    background-color: green;
    font-weight: bold;
    padding: 4px 2rem;
    font-size: 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* The right buttons */
#right-buttons {
    display: flex;
    flex-shrink: 1;
}

#filename {
    cursor: pointer;
    border: none;
    background: none;
    color: white;
    font-size: 16px;
    border: solid 1px #4e4e4e;
    padding: 4px;
}

#filename:focus {
    outline: none;
    background-color: #444;
    color: white;
}

#editor {
    position: absolute;
    top: 50px;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(100% - 50px);
    width: 100%;
    overflow: auto;
    box-sizing: border-box;
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    border-radius: 8px;
    background-color: #1e1e1e;
}

*::-webkit-scrollbar-thumb {
    border-radius: 8px;
    background-color: #2c3e50;
}

button {
    background-color: #444;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    margin: 0 2px;
}

button:hover {
    background-color: #555;
}

 /* Modal styles */
 .modal {
     display: none;
     position: fixed;
     z-index: 1000;
     left: 0;
     top: 0;
     width: 100%;
     height: 100%;
     background-color: rgba(0, 0, 0, 0.7);
     justify-content: center;
     align-items: center;
 }

 /* Scrollable content inside the modal */
 .modal-content {
     background-color: #1e1e1e;
     padding: 20px;
     border-radius: 8px;
     color: white;
     max-width: 90%;
     max-height: 90%;
     position: relative;
     /* Sets positioning context for the close button */
     display: flex;
     flex-direction: column;
     border: solid 1px #4e4e4e;
     min-width: 60%;
     min-height: 60%;

 }

 /* Container that handles scrolling instead of .modal-content */
 .modal-body {
     overflow: auto;
     /* Allows only the content inside this to scroll */
     max-height: calc(100% - 50px);
     /* Ensures space for the close button */
     padding-top: 10px;
     /* Optional: Space below the button */

 }

 /* Close button positioned inside the modal content but remains fixed in place */
 .close {
     position: absolute;
     top: 10px;
     right: 10px;
     color: #aaa;
     font-size: 32px;
     font-weight: bold;
     cursor: pointer;
     border: none;
     background: none;
     z-index: 1;
     /* Ensures it stays above the content */
 }

 .close:hover {
     color: white;
 }