/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", system-ui, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
img {
    width: 50px;
    height: 40px;
    margin-right: 10px;
}
.main-heading {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    padding: 16px;
    background: linear-gradient(to right, #020617, #0f172a);
    border-bottom: 1px solid #1e293b;
    color: #38bdf8;
    letter-spacing: 1px;
}

/* Layout */
.container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Panels (common styling) */
.editor-panel,
.preview-panel {
    width: 50%;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

/* Panel headers */
.editor-panel h3,
.preview-panel h3 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
    color: #94a3b8;
    letter-spacing: 0.5px;
}

/* Divider */
.editor-panel {
    border-right: 1px solid #1e293b;
}

/* Editor */
#editor {
    flex: 1;
    width: 100%;
    background: #020617;
    color: #22c55e;
    border: 1px solid #1e293b;
    border-radius: 10px;
    padding: 15px;
    font-family: "Fira Code", monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: none;
    outline: none;
    transition: 0.2s ease;
}

/* Editor focus effect */
#editor:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

/* Preview */
#preview {
    flex: 1;
    width: 100%;
    background: white;
    border-radius: 10px;
    border: 1px solid #1e293b;
}

/* Scrollbar (pro look) */
#editor::-webkit-scrollbar {
    width: 8px;
}

#editor::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 10px;
}

/* Responsive (important for polish) */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .editor-panel,
    .preview-panel {
        width: 100%;
        height: 50%;
    }

    .editor-panel {
        border-right: none;
        border-bottom: 1px solid #1e293b;
    }
}