body, html {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f4f9;
    color: #333;
    height: 100%;
}

#app {
    display: flex;
    flex-direction: column;
    height: 100%;
}

header {
    background-color: #2196f3;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
    margin: 0;
    font-size: 1.2rem;
}

#auth-container button {
    background-color: #fff;
    color: #2196f3;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    overflow: hidden;
}

#file-controls {
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
}

#file-controls button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 0.7rem 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

#file-controls button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#editor-container {
    flex-grow: 1;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.CodeMirror {
    height: 100%;
    font-size: 16px;
}

#file-info {
    margin-top: 1rem;
    font-style: italic;
    color: #666;
}

/* Modal Styles */
#file-picker-modal {
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-hidden {
    display: none !important;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 0;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

.modal-header {
    padding: 10px 16px;
    background-color: #2196f3;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.1rem;
}

#modal-close-button {
    color: white;
    font-size: 28px;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
}

#file-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
}

#file-list li {
    padding: 12px 16px;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
    display: flex;
    align-items: center;
}

#file-list li:hover {
    background-color: #f1f1f1;
}

#file-list li::before {
    content: '📄'; /* Default file icon */
    margin-right: 10px;
    font-size: 1.2em;
}

#file-list li.folder::before {
    content: '📁'; /* Folder icon */
}

#file-list li.parent::before {
    content: '⬆️'; /* Up icon */
}