.cfp-app * { box-sizing: border-box; }
.cfp-app {
    background: #0b0f1a;
    color: #e2e8f0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    border-radius: 12px;
    border: 1px solid #1e293b;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-width: 100%;
    margin: 20px 0;
}

.cfp-header {
    padding: 15px 20px;
    background: #0f172a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #1e293b;
}

.cfp-logo {
    background: #6366f1;
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-weight: bold;
    margin-right: 10px;
}

.cfp-main-layout {
    display: flex;
    flex-wrap: wrap;
    min-height: 500px;
}

.cfp-sidebar {
    width: 240px;
    background: #0f172a;
    padding: 20px;
    border-right: 1px solid #1e293b;
}

.cfp-editor-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 300px;
}

.cfp-editor-row {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
}

.cfp-editor-block {
    flex: 1;
    min-width: 300px;
    border: 1px solid #1e293b;
    display: flex;
    flex-direction: column;
}

.cfp-label {
    padding: 8px 15px;
    background: #1e293b;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    color: #94a3b8;
}

/* Tab & Buttons */
.cfp-tab {
    width: 100%;
    text-align: left;
    background: transparent;
    border: 1px solid transparent;
    color: #94a3b8;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 5px;
    cursor: pointer;
}
.cfp-tab.active {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    border-color: #6366f1;
}

.cfp-btn {
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    background: #1e293b;
    color: white;
    border: none;
}
.cfp-btn-run { background: #6366f1; }

/* CodeMirror Sizing Fix */
.CodeMirror {
    height: 100% !important;
    min-height: 400px;
    background: transparent !important;
}

.cfp-footer-bar {
    padding: 10px 20px;
    background: #0f172a;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.cfp-console {
    background: black;
    color: #10b981;
    font-family: monospace;
    padding: 10px;
    font-size: 11px;
    max-height: 100px;
    overflow-y: auto;
}

@media (max-width: 900px) {
    .cfp-main-layout { flex-direction: column; }
    .cfp-sidebar { width: 100%; border-right: none; border-bottom: 1px solid #1e293b; }
}