/* Base Styling */
body {
    margin: 0;
    font-family: 'Fira Code', monospace;
    background-color: #1e1e1e;
    color: #e0e0e0;
}

/* Layout */
.playground-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

@media (min-width: 768px) {
    .playground-container {
        flex-direction: row;
    }
}

.editor-section,
.output-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    min-height: 50vh;
    box-sizing: border-box;
    overflow: hidden;
}

/* Headings */
h1 {
    color: #0ef;
    font-size: 1.75rem;
    margin: 0 0 1rem;
}

h2 {
    font-size: 1.5rem;
    color: #72aaff;
    margin-bottom: 1rem;
}

/* Monaco Editor Box */
.editor-box,
#editor {
    flex-grow: 1;
    min-height: 250px;
    max-height: 45vh;
    background-color: #1e1e1e;
    border: 1px solid #444;
    border-radius: 8px;
    margin-top: 1rem;
    overflow: auto;
}

@media (min-width: 768px) {
    .editor-box,
    #editor {
        max-height: unset;
    }
}

/* Run Button */
.run-btn,
button.btn {
    margin-top: 1rem;
    background-color: #ff001e;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    width: 100%;
    z-index: 10;
    box-sizing: border-box;
}

.run-btn:hover,
button.btn:hover {
    background-color: #d4001b;
}

/* Runtime Select */
.runtime-select {
    background-color: #1e1e1e;
    color: #e0e0e0;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 0.4rem 1rem;
    font-size: 1rem;
    margin-bottom: 1rem;
    font-family: 'Fira Code', monospace;
    width: 100%;
    box-sizing: border-box;
}

/* Output Section */
.output-section {
    background-color: #121212;
    border-top: 1px solid #333;
}

@media (min-width: 768px) {
    .output-section {
        border-left: 1px solid #333;
        border-top: none;
    }
}

.output-box,
pre {
    flex: 1;
    background-color: #121212;
    color: #00ff88;
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 8px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Validation Feedback */
.validation-message,
.invalid {
    color: #ff6b6b;
}

.valid.modified:not([type=checkbox]) {
    border: 1px solid #26b050;
}