body { 
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Roobert,-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif;
}

h1 {
    text-align: center;   
    margin: 30px 0;     
}

main {
    height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

.container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 40px;
}

.editor-wrapper {
    width: 40%;
    height: 400px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.actionbutton {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

/* CodeMirror styling */
.CodeMirror {
    height: 400px !important;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.4;
    border: none;
}

.CodeMirror-focused .CodeMirror-cursor {
    border-left: 1px solid #007acc;
}

.CodeMirror-focused .CodeMirror-selected {
    background: rgba(0, 122, 204, 0.2);
}

.CodeMirror .CodeMirror-activeline-background {
    background: rgba(0, 122, 204, 0.1) !important;
}

.CodeMirror .CodeMirror-linenumber {
    color: #666;
    padding: 0 8px 0 5px;
}

.CodeMirror-gutters {
    background-color: #f8f9fa;
    border-right: 1px solid #eee;
}

/* Fallback textarea styling (hidden when CodeMirror loads) */
textarea {
    width: 100%;
    height: 100%;
    resize: none;
    border: none;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.4;
    outline: none;
}

#output_XML {
    background-color: #f8f9fa;
    color: #333;
}

.Format {
    appearance: none;
    background-color: #000000;
    border: 2px solid #1A1A1A;
    border-radius: 15px;
    color: #FFFFFF;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    padding: 16px 24px;
    text-align: center;
    transition: all 300ms ease;
    min-width: 120px;
}

.Format:hover {
    box-shadow: rgba(0, 0, 0, 0.25) 0 8px 15px;
    transform: translateY(-2px);
}

.Format:active {
    box-shadow: none;
    transform: translateY(0);
}

.clear {
    color: red;
    background-color: transparent;
    border: 2px solid red;
}

.copy-btn {
    background: #f5df1b;
    color: #000000;
    padding: 16px 24px;
    border-radius: 15px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.2s ease;
    min-width: 120px;
}

.copy-btn:hover {
    background: #ffed4e;
    box-shadow: rgba(0, 0, 0, 0.25) 0 8px 15px;
    transform: translateY(-2px);
}

.copy-btn:active {
    background: #e6d329;
    transform: translateY(0);
}

.copy-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

footer {
    font-size: 12px;
    text-align: center;   
    margin-top: 50px;
    color: #666;
}

footer a {
    color: #007acc;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        gap: 1rem;
        padding: 0 20px;
    }
    
    .editor-wrapper {
        width: 100%;
        height: 300px;
    }
    
    .CodeMirror {
        height: 300px !important;
    }
    
    .actionbutton {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
}