body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow: hidden; /* Prevent scrolling to keep the minimized editor visible */
}

#editor-container {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 80%;
    height: 80%;
    background: #383737;
    border: 1px solid #f44646;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    display: none; /* Initially hidden */
    flex-direction: column;
    z-index: 1000; /* Ensure it stays on top */
    resize: both;
    overflow: auto;
}

#editor-header {
    background: #ccc;
    color: #000;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Space between title and minimize button */
    border-radius: 8px 8px 0 0;
    cursor: move;
    position: relative;
}

#editor-header span {
    margin: 0;
}

#minimize-button {
    background: #bbb;
    border: none;
    border-radius: 4px;
    width: 30px;
    height: 30px;
    font-size: 18px;
    cursor: pointer;
}

textarea {
    width: 100%;
    height: calc(100% - 40px); /* Adjust height to fit below the header */
    margin: 0;
    font-family: monospace;
    font-size: 16px;
    padding: 10px;
    border: none;
    box-sizing: border-box;
}

#preview {
    width: 100%;
    height: calc(100vh - 40px);
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px;
    background-color: #f9f9f9;
    box-sizing: border-box;
}

#editor-toggle {
    position: fixed; /* Fixed position to stay in view */
    bottom: 20px;
    right: 20px;
    width: 100px;
    height: 100px;
    background-color: #007bff;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    text-align: center;
    line-height: 1.2;
    z-index: 1000; /* Ensure it stays on top */
}
