
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1e1e1e;
    color: #ffffff;
    overflow: hidden;
}

.container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.toolbar {
    background: #2d2d30;
    padding: 8px 16px;
    align-items: center;
    border-bottom: 1px solid #3e3e42;
}

.toolbar select,
.toolbar button {
    background: #3c3c3c;
    color: #ffffff;
    border: 1px solid #555555;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.toolbar button:hover,
.toolbar select:hover {
    background: #4a4a4a;
}

.main-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.sidebar {
    width: 250px;
    background: #252526;
    border-right: 1px solid #3e3e42;
    padding: 16px;
    overflow-y: auto;
}

.sidebar button {
    width: 100%;
    background: rgb(136, 0, 255);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 16px;
}

.sidebar button:hover {
    background: #1177bb;
}

.server-file-item{
    padding: 8px;
    border-radius: 4px;
    background: #3e3e42;
    margin-bottom: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.server-file-item:hover {
    background: #4a4a4a;
}

.file-tree-item {
    user-select: none;
    cursor: pointer;
}

.folder-item {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    margin-bottom: 2px;
    border-radius: 4px;
    font-size: 14px;
    color: #cccccc;
}

.folder-item:hover {
    background: #3e3e42;
}

.folder-item.expanded {
    background: #2d2d30;
}

.folder-icon {
    margin-right: 6px;
    font-size: 12px;
    transition: transform 0.2s;
}

.folder-icon.expanded {
    transform: rotate(90deg);
}

.file-item {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    margin-bottom: 2px;
    border-radius: 4px;
    font-size: 14px;
    color: #ffffff;
    cursor: pointer;
}

.file-item:hover {
    background: #3e3e42;
}

.file-item.selected {
    background: #0e639c;
}

.file-icon {
    margin-right: 6px;
    font-size: 12px;
    color: #888;
}

.folder-contents {
    margin-left: 16px;
    display: none;
}

.folder-contents.expanded {
    display: block;
}

.project-dropdown {
    display: inline-block;
}

.projects-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #3c3c3c;
    border: 1px solid #555555;
    border-radius: 4px;
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.project-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #555555;
}

.project-item:hover {
    background: #4a4a4a;
}

.project-item:last-child {
    border-bottom: none;
}

.project-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.project-popup-content {
    background: #2d2d30;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid #555555;
    min-width: 400px;
}

.project-popup input {
    width: 100%;
    padding: 8px;
    margin: 12px 0;
    background: #3c3c3c;
    border: 1px solid #555555;
    border-radius: 4px;
    color: white;
}

.project-popup-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 16px;
}

.save-file-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.save-file-popup-content {
    background: #2d2d30;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid #555555;
    min-width: 400px;
}

.save-file-popup input, .save-file-popup select {
    width: 100%;
    padding: 8px;
    margin: 8px 0;
    background: #3c3c3c;
    border: 1px solid #555555;
    border-radius: 4px;
    color: white;
}

.editor-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#tabContainer {
    background: #2d2d30;
    display: flex;
    border-bottom: 1px solid #3e3e42;
    overflow-x: auto;
}

.tab {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    background: #3c3c3c;
    border-right: 1px solid #555555;
    cursor: pointer;
    white-space: nowrap;
    min-width: 120px;
}

.tab.active {
    background: #1e1e1e;
    border-bottom: 2px solid #0e639c;
}

.tab-title {
    margin-right: 8px;
    font-size: 14px;
}

.tab-close {
    font-size: 16px;
    cursor: pointer;
    opacity: 0.7;
}

.tab-close:hover {
    opacity: 1;
}

#editorContainer {
    flex: 1;
    position: relative;
}


.editor {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
}

.editor.active {
    display: block;
}

.preview-area {
    width: 400px;
    background: #1e1e1e;
    border-left: 1px solid #3e3e42;
    display: none;
    flex-direction: column;
}

.preview-area.active {
    display: flex;
}

.preview-header {
    background: #2d2d30;
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #3e3e42;
}

.preview-header button {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
}

#previewFrame {
    flex: 1;
    border: none;
    background: white;
}

#phpOutput {
    flex: 1;
    padding: 16px;
    background: #1e1e1e;
    color: #ffffff;
    font-family: 'Courier New', monospace;
    overflow-y: auto;
    white-space: pre-wrap;
    display: none;
}

.file-item {
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 4px;
    margin-bottom: 2px;
    font-size: 14px;
}

.file-item:hover {
    background: #3e3e42;
}

.file-item.selected {
    background: #0e639c;
}

.folder-item {
    font-weight: bold;
    color: #cccccc;
}

.file-item.file {
    color: #ffffff;
    padding-left: 20px;
}

@media only screen and (max-width: 900px){
    .sidebar {
    width: 250px;
    background: #252526;
    border-right: 1px solid #3e3e42;
    padding: 16px;
    position: fixed;
    overflow-y: auto;
    z-index: 9999999;
    height: 100vh;
}
}
