:root {
    --bg-darker: #11111b;
    --bg-main: #181825;
    --accent: #89b4fa;
    --text: #cdd6f4;
    --console-bg: #000000;
    --border: #313244;
}

* { box-sizing: border-box; }

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden; 
    background: var(--bg-main);
    color: var(--text);
    font-family: 'Segoe UI', Roboto, -apple-system, sans-serif;
}

.app-container {
    display: flex;
    height: 100vh;
    flex-direction: row;
}

.sidebar {
    width: 260px;
    background: var(--bg-darker);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-right: 1px solid var(--border);
    z-index: 10;
}

.logo h2 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--accent);
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

select {
    padding: 10px;
    background: #1e1e2e;
    color: white;
    border: 1px solid var(--border);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

button {
    background: var(--accent);
    border: none;
    padding: 12px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    color: #11111b;
    transition: opacity 0.2s;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0; 
}

#editor-container {
    flex: 3; 
    min-height: 200px;
}

#console-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--console-bg);
    border-top: 2px solid var(--border);
}

.console-header {
    padding: 5px 15px;
    font-size: 0.8rem;
    background: #11111b;
    color: #6c7086;
    border-bottom: 1px solid var(--border);
}

#console-output {
    flex: 1;
    margin: 0;
    padding: 15px;
    color: #a6e3a1;
    overflow: auto;
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    white-space: pre-wrap;
    word-break: break-all;
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        padding: 10px 15px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .logo h2 {
        font-size: 1rem;
    }

    .controls {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }

    .control-group {
        flex-direction: row;
        align-items: center;
    }

    .control-group label {
        display: none; 
    }

    select {
        padding: 6px;
        font-size: 0.9rem;
    }

    button {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    #editor-container {
        flex: 2
    }
    
    #console-wrapper {
        flex: 1.5;
    }
}

@media (max-width: 480px) {
    .logo { display: none; }
    .sidebar { justify-content: flex-start; }
    .controls { width: 100%; justify-content: space-between; }
}