/* Global Container styling following Light Grey layout rules */
.mdg-container *, .mdg-container *::before, .mdg-container *::after {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.mdg-container {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    background-color: #f5f5f5;
    border: 1px solid #e0E0e0;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    overflow: hidden;
}

/* Header Bar Styling with Centered Text */
.mdg-header {
    background-color: #e0e0e0;
    padding: 15px 20px;
    text-align: center;
    border-bottom: 1px solid #dcdcdc;
}

.mdg-header h1 {
    margin: 0;
    font-size: 24px;
    color: #222222;
    font-weight: 700;
}

/* Tabs System */
.mdg-tabs {
    display: flex;
    background-color: #e8e8e8;
    border-bottom: 1px solid #dcdcdc;
    overflow-x: auto;
}

.mdg-tab-btn {
    flex: 1;
    min-width: 120px;
    background: none;
    border: none;
    outline: none;
    padding: 12px 15px;
    font-size: 14px;
    font-weight: 600;
    color: #555555;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    text-align: center;
    white-space: nowrap;
}

.mdg-tab-btn:hover {
    background-color: #e0e0e0;
    color: #222222;
}

.mdg-tab-btn.active {
    background-color: #f5f5f5;
    color: #222222;
    border-bottom: 2px solid #222222;
}

/* Form Layout Content Area */
.mdg-tab-content {
    display: none;
    padding: 20px;
    background-color: #f5f5f5;
}

.mdg-tab-content.active {
    display: block;
}

.mdg-tab-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333333;
    font-size: 18px;
}

.mdg-form-group {
    margin-bottom: 15px;
}

.mdg-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #444444;
    font-size: 14px;
}

.mdg-form-group select, .mdg-form-group input[type="range"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    background-color: #ffffff;
    font-size: 14px;
    color: #333333;
}

.mdg-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    background: #ffffff;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #cccccc;
}

.mdg-checkbox-group label {
    font-size: 14px;
    color: #444444;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Light Neon Green Action Button */
.mdg-btn-main {
    width: 100%;
    background-color: #39ff14;
    color: #222222;
    border: none;
    border-radius: 4px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mdg-btn-main:hover {
    background-color: #00ff66;
}

.mdg-btn-main:active {
    transform: scale(0.99);
}

/* Real-Time Preview Area Workspace */
.mdg-output-area {
    padding: 20px;
    background-color: #f5f5f5;
    border-top: 1px solid #e0e0e0;
}

.mdg-output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.mdg-output-header span {
    font-weight: 700;
    color: #222222;
    font-size: 14px;
}

.mdg-actions {
    display: flex;
    gap: 8px;
}

.mdg-btn-action {
    background-color: #39ff14;
    color: #222222;
    border: none;
    border-radius: 4px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
}

.mdg-btn-action:hover {
    background-color: #00ff66;
}

#mdg-screen {
    width: 100%;
    height: 220px;
    background-color: #ffffff;
    color: #222222;
    border: 1px solid #cccccc;
    border-radius: 4px;
    padding: 12px;
    font-family: "Courier New", Courier, monospace;
    font-size: 13px;
    resize: vertical;
    outline: none;
}

/* Mobile-first optimizations and fluid screens adjustments */
@media (max-width: 600px) {
    .mdg-tabs {
        flex-direction: row;
    }
    .mdg-checkbox-group {
        flex-direction: column;
        gap: 8px;
    }
}