html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: -apple-system, BlinkMacMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
}

.container {
    display: flex;
    width: 100vw;
    height: 100vh;
    box-sizing: border-box;
}

.pane {
    padding: 15px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.editor-pane {
    flex: 2;
    background-color: #ffffff;
    border-right: 1px solid #d0d0d0;
}

.editor-header {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    margin-bottom: 10px; 
}
.editor-header h2 {
    margin: 0; 
}

.small-button {
    padding: 5px 10px;
    font-size: 14px;
    background-color: #28a745; 
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s, opacity 0.2s;
}
.small-button:hover {
    background-color: #218838;
}
.small-button:disabled {
    background-color: #a0a0a0;
    opacity: 0.7;
    cursor: not-allowed;
}

#editor-container {
    flex-grow: 1; 
    min-height: 200px; 
    
    position: relative;
    overflow: hidden; 

    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}


.controls-pane {
    flex: 1;
    background-color: #f9f9f9;
}
.controls-pane h2 {
    margin-top: 3px; 
    margin-bottom: 15px;
}

.controls-pane button[id="run-button"] + h3 {
    margin-top: 20px;
    margin-bottom: 1px;
}

.controls-pane div[id="problem-description"] + h3 {
    margin-top: 25px;
    margin-bottom: 1px;
}

.settings-group {
    margin-bottom: 10px;
}
.settings-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
}
.settings-group label a {
    font-size: 12px;
    font-weight: normal;
    margin-left: 8px;
    color: #007bff;
    text-decoration: none;
}
.settings-group label a:hover {
    text-decoration: underline;
}

.api-key-wrapper {
    display: flex;
    align-items: center; 
    width: 100%;
}

.api-key-wrapper input[type="password"] {
    flex-grow: 1; 
    box-sizing: border-box; 
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.clear-button {
    flex-shrink: 0; 
    margin-left: 8px; 

    background-color: #dc3545; 
    border: none;
    border-radius: 4px; 
    
    width: 22px; 
    height: 22px; 
    padding: 0; 
    
    cursor: pointer;
    transition: background-color 0.2s; 

    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-button svg {
    width: 14px; 
    height: 14px; 
    fill: white; 
}


.clear-button:hover {
    background-color: #c82333; 
}


.settings-group textarea {
    width: 100%;
    box-sizing: border-box; 
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
    font-family: Arial, sans-serif;
}

.controls-pane > button {
    display: block;
    width: 100%;
    padding: 12px;
    margin-bottom: 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s, opacity 0.2s;
}
.controls-pane > button:hover {
    background-color: #0056b3;
}
.controls-pane > button:disabled {
    background-color: #a0a0a0;
    opacity: 0.7;
    cursor: not-allowed;
}

.output-area {
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    min-height: 150px;
    white-space: pre-wrap;
    font-family: "Courier New", Courier, monospace;
    font-size: 14px;
    margin-top: 10px;
    flex-grow: 1; 
    flex-basis: 150px; 
    overflow-y: auto;  
}

.editor-footer {
    flex-shrink: 0; 
    padding-top: 10px; 
    font-size: 12px;
    color: #555;
    text-align: center;
}

.editor-footer a {
    color: #007bff; 
    text-decoration: none;
}

.editor-footer a:hover {
    text-decoration: underline; 
}