.playpython-workspace {
    --pp-bg: #0b1020;
    --pp-card: rgba(15, 23, 42, 0.96);
    --pp-card-soft: rgba(30, 41, 59, 0.94);
    --pp-border: rgba(148, 163, 184, 0.2);
    --pp-text: #e5e7eb;
    --pp-muted: #94a3b8;
    --pp-primary: #38bdf8;
    --pp-primary-dark: #0284c7;
    --pp-success: #22c55e;
    background: radial-gradient(circle at top left, rgba(56, 189, 248, .2), transparent 30%), var(--pp-bg);
    color: var(--pp-text);
    border: 1px solid var(--pp-border);
    border-radius: 24px;
    box-shadow: 0 24px 80px rgba(2, 6, 23, .28);
    padding: 22px;
    overflow: hidden;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.playpython-theme-light {
    --pp-bg: #f8fafc;
    --pp-card: #ffffff;
    --pp-card-soft: #f1f5f9;
    --pp-border: rgba(15, 23, 42, 0.12);
    --pp-text: #0f172a;
    --pp-muted: #475569;
}

.playpython-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 14px;
}

.playpython-header h3 {
    color: var(--pp-text);
    font-size: clamp(22px, 3vw, 34px);
    line-height: 1.1;
    margin: 8px 0 6px;
}

.playpython-header p {
    color: var(--pp-muted);
    margin: 0;
    font-size: 15px;
}

.playpython-badge {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(56, 189, 248, .4);
    background: rgba(56, 189, 248, .12);
    color: var(--pp-primary);
    border-radius: 999px;
    padding: 5px 12px;
    font-weight: 700;
    font-size: 13px;
}

.playpython-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.playpython-btn {
    border: 1px solid var(--pp-border);
    background: var(--pp-card-soft);
    color: var(--pp-text);
    border-radius: 14px;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 700;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.playpython-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: rgba(56, 189, 248, .6);
}

.playpython-run {
    background: linear-gradient(135deg, var(--pp-primary), var(--pp-primary-dark));
    color: #fff;
    border: none;
}

.playpython-btn:disabled {
    opacity: .65;
    cursor: not-allowed;
}

.playpython-status {
    color: var(--pp-muted);
    border: 1px solid var(--pp-border);
    background: rgba(15, 23, 42, .34);
    border-radius: 14px;
    padding: 10px 12px;
    margin-bottom: 14px;
    font-size: 14px;
}

.playpython-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
}

.playpython-panel {
    min-width: 0;
    border: 1px solid var(--pp-border);
    background: var(--pp-card);
    border-radius: 20px;
    overflow: hidden;
}

.playpython-panel-title {
    border-bottom: 1px solid var(--pp-border);
    color: var(--pp-muted);
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.playpython-code,
.playpython-output {
    width: 100%;
    height: var(--playpython-height, 540px);
    margin: 0;
    padding: 18px;
    border: none;
    outline: none;
    resize: vertical;
    background: transparent;
    color: var(--pp-text);
    font: 15px/1.6 "JetBrains Mono", "Fira Code", Consolas, Monaco, monospace;
    box-sizing: border-box;
}

.playpython-output {
    white-space: pre-wrap;
    word-break: break-word;
    color: #d1fae5;
}

.playpython-theme-light .playpython-output {
    color: #064e3b;
}

@media (max-width: 860px) {
    .playpython-header {
        flex-direction: column;
    }

    .playpython-actions {
        justify-content: flex-start;
    }

    .playpython-grid {
        grid-template-columns: 1fr;
    }
}
