/* styles.css */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
}

.navbar {
    background-color: #333;
    color: white;
    padding: 10px;
}

.navbar ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.navbar ul li {
    margin-right: 20px;
}

.navbar ul li a {
    color: white;
    text-decoration: none;
    font-size: 16px;
}

.navbar ul li a:hover {
    text-decoration: underline;
}

.toolbar {
    background-color: #444;
    padding: 10px;
    display: flex;
    gap: 10px;
}

.toolbar button {
    background-color: #555;
    border: none;
    color: white;
    padding: 10px;
    cursor: pointer;
    border-radius: 4px;
}

.toolbar button:hover {
    background-color: #666;
}

.editor-container {
    display: flex;
    width: 100%;
    height: calc(100vh - 100px);
    overflow: hidden;
}

.editor, .preview {
    flex: 1;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
    min-width: 0;
}

textarea {
    width: 100%;
    height: 100%;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px;
    font-size: 16px;
    resize: none;
    box-sizing: border-box;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow: auto;
    tab-size: 4;
    font-family: Consolas, Monaco, 'Courier New', monospace;
    line-height: 1.6;
}

#html-output {
    width: 100%;
    height: 100%;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px;
    background-color: #fff;
    overflow-y: auto;
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

#html-output img {
    max-width: 100%;
    height: auto;
}

#html-output pre {
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

#html-output code {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

@media (max-width: 768px) {
    .editor-container {
        flex-direction: column;
    }
    
    .editor, .preview {
        width: 100%;
        height: 50%;
    }
    
    .navbar ul {
        flex-wrap: wrap;
    }
    
    .navbar ul li {
        margin-right: 10px;
        margin-bottom: 5px;
    }
    
    .toolbar {
        flex-wrap: wrap;
    }
}
